-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
🐛 Bug Description
When running python scripts/data_collector/yahoo/collector.py download_data --source_dir ~/.qlib/stock_data/source/cn_1min --region CN --start 2021-05-20 --end 2021-05-23 --delay 0.1 --interval 1min --limit_nums 10 it returns the following bug
ModuleNotFoundError: No module named 'qlib.constant'
To Reproduce
Steps to reproduce the behavior:
- Download qlib repo
- Run the command
python scripts/data_collector/yahoo/collector.py download_data --source_dir ~/.qlib/stock_data/source/cn_1min --region CN --start 2021-05-20 --end 2021-05-23 --delay 0.1 --interval 1min --limit_nums 10
Expected Behavior
It should return the following bug ModuleNotFoundError: No module named 'qlib.constant'
Screenshot
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
Darwin
x86_64
macOS-10.16-x86_64-i386-64bit
Darwin Kernel Version 21.2.0: Sun Nov 28 20:29:10 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T8101
Python version: 3.8.12 (default, Oct 12 2021, 06:23:56) [Clang 10.0.0 ]
Qlib version: 0.8.0
numpy==1.22.0
pandas==1.3.5
scipy==1.7.3
requests==2.27.1
sacred==0.8.2
python-socketio==5.5.1
redis==4.1.0
python-redis-lock==3.7.0
schedule==1.1.0
cvxpy==1.1.18
hyperopt==0.1.1
fire==0.4.0
statsmodels==0.13.1
xlrd==2.0.1
plotly==5.5.0
matplotlib==3.5.1
tables==3.7.0
pyyaml==6.0
mlflow==1.22.0
tqdm==4.62.3
loguru==0.5.3
lightgbm==3.3.2
tornado==6.1
joblib==1.1.0
fire==0.4.0
ruamel.yaml==0.17.20
Additional Notes
I have solved this problem by importing from qlib.config import REG_CN as REGION_CN instead of from qlib.constant import REG_CN as REGION_CN
