US 1min Data 404 Client Error
❓ Questions and Help
We sincerely suggest you to carefully read the documentation of our library as well as the official paper. After that, if you still feel puzzled, please describe the question clearly under this issue.
Hi, I tried to download US stock data, 1min interval, the command I use is as below, but I got below error
(qlib) [longc@arch qlib]$ python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/us_data_1min --region us —interval 1min
Traceback (most recent call last):
File "scripts/get_data.py", line 9, in <module>
fire.Fire(GetData)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/qlib/tests/data.py", line 191, in qlib_data
self.download_data(file_name.lower(), target_dir, delete_old)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/qlib/tests/data.py", line 74, in download_data
resp.raise_for_status()
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: The specified blob does not exist. for url: https://qlibpublic.blob.core.windows.net/data/default/stock_data/1min/%E2%80%94interval_us_1d_latest.zip?sv=2020-10-02&st=2023-06-21T00%3A58%3A06Z&se=2043-06-22T00%3A58%3A00Z&sr=c&sp=rl&sig=ykiWECM7%2BsPLXE32ZM6p2Tc1mMDeUaCmo8LD%2BOKiAo4%3D
I wondered if it because V2 data is currently not available now, so I tried V1 data as well by running
python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/us_data_1min --region us --interval 1min —version v1
But I got a similar error as well
(qlib) [longc@arch qlib]$ python scripts/get_data.py qlib_data --target_dir ~/.qlib/qlib_data/us_data_1min --region us --interval 1min —version v1
Traceback (most recent call last):
File "scripts/get_data.py", line 9, in <module>
fire.Fire(GetData)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/qlib/tests/data.py", line 191, in qlib_data
self.download_data(file_name.lower(), target_dir, delete_old)
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/qlib/tests/data.py", line 74, in download_data
resp.raise_for_status()
File "/home/longc/anaconda3/envs/qlib/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: The specified blob does not exist. for url: https://qlibpublic.blob.core.windows.net/data/default/stock_data/v1/%E2%80%94version_us_1min_latest.zip?sv=2020-10-02&st=2023-06-21T00%3A58%3A06Z&se=2043-06-22T00%3A58%3A00Z&sr=c&sp=rl&sig=ykiWECM7%2BsPLXE32ZM6p2Tc1mMDeUaCmo8LD%2BOKiAo4%3D
Is it because the data is not available on qlib server? Or how can I download the right 1min US stock data?
Thank you very much!
Thanks for your question! When the aimed data is cached, you can use the collector data to get the Qlib data. However, we haven't cached all the data, and at this time you need to download and process the data by yourself. You can refer to this section to download the data.
Thank you for your question, I looked at your command and the output, I think it's a problem with your command that is causing this error, you can look at your command and see that there is an - symbol missing in front of version. The correct syntax should be: --version.
Thank you for your question, I looked at your command and the output, I think it's a problem with your command that is causing this error, you can look at your command and see that there is an
-symbol missing in front of version. The correct syntax should be:--version.
Thank you, I modified my command and it turns out the same problem. Looks like the aimed data is not cached yet. I will keep waiting until this done. Thanks for your time.