Dear QuantRocket Support,
I am experiencing a persistent ImportError
when attempting to use get_prices
from quantrocket.history
in my JupyterLab environment. This occurs despite running QuantRocket version 2.11.0.
Problem Description:
When I run from quantrocket.history import get_prices, list_sids
in a Jupyter Notebook cell, I receive the following error:
System Information:
- QuantRocket Version: 2.11.0
- Deployment Type: Self-hosted (on Windows, using Docker Desktop)
- Python Version in Jupyter: 3.11
Troubleshooting Steps Taken (with results):
-
Initial query attempt: Received the
ImportError
. -
Jupyter Kernel Restart (
Kernel -> Restart & Clear Output
): Did not resolve the error. -
Attempted
!pip install --upgrade quantrocket
in Jupyter Notebook: Failed withERROR: Could not find a version that satisfies the requirement quantrocket (from versions: none)
andERROR: No matching distribution found for quantrocket
. This indicatedpip
could not find the package. -
Confirmed Docker not available in Jupyter terminal:
docker info
resulted inzsh: command not found: docker
. -
Attempted
quantrocket service stop/start jupyter
in Jupyter terminal: Failed withinvalid choice: 'service'
. -
Accessed host machine's terminal (Windows Command Prompt/PowerShell): Successfully ran
docker
commands. -
Restarted Jupyter container (
docker restart quantrocket-jupyter-1
): Container restarted, but theImportError
persisted in JupyterLab. -
Direct inspection of
quantrocket.history
module in Jupyter Notebook (dir(quantrocket.history)
):- Output:
['FilepathOrBuffer', 'Literal', 'NoHistoricalData', 'TMP_DIR', 'Union', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_cli_cancel_collections', '_cli_collect_history', '_cli_create_custom_db', '_cli_create_edi_db', '_cli_create_ibkr_db', '_cli_create_sharadar_db', '_cli_create_usstock_db', '_cli_download_history_file', '_cli_drop_db', '_cli_get_db_config', '_cli_get_history_queue', '_cli_list_databases', '_cli_list_sids', '_cli_wait_for_collections', 'cancel_collections', 'collect_history', 'create_custom_db', 'create_edi_db', 'create_ibkr_db', 'create_sharadar_db', 'create_usstock_db', 'dict_strs_to_dict', 'dict_to_dict_strs', 'download_history_file', 'drop_db', 'get_db_config', 'get_history_queue', 'houston', 'json_to_cli', 'list_databases', 'list_sids', 'os', 'requests', 'sys', 'wait_for_collections', 'write_response_to_filepath_or_buffer']
-
Finding:
get_prices
is explicitly NOT in this list, confirming it's missing from the loaded module.list_sids
is present.
- Output:
-
Direct inspection of
history.py
file content in Jupyter Notebook:- Ran code to read
/opt/conda/lib/python3.11/site-packages/quantrocket/history.py
. -
Finding: The output explicitly stated
'def get_prices' NOT found in the file.
This confirms the file being loaded literally lacks the function.
- Ran code to read
-
Aggressive Docker image purge and container recreation:
docker stop quantrocket-jupyter-1
docker rm quantrocket-jupyter-1
-
docker rmi quantrocket/jupyter:2.11.0
(successfully deleted the image) -
docker compose up -d jupyter
(successfully pulled a fresh image and started container) -
Result: Despite this, the
ImportError
forget_prices
still persists after refreshing JupyterLab and rerunning the code.
Expected Behavior:
Based on QuantRocket v2.11.0 documentation, get_prices
should be available in quantrocket.history
and allow querying of loaded data.
Request:
Could you please assist in diagnosing this persistent environment issue? It seems the Jupyter container's Python environment is not correctly loading the quantrocket
client library despite thorough recreation efforts.
Thank you for your time.