Skip to content

data collector for PIT is not working #1892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hlstwizard opened this issue Mar 6, 2025 · 1 comment
Closed

data collector for PIT is not working #1892

hlstwizard opened this issue Mar 6, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@hlstwizard
Copy link

hlstwizard commented Mar 6, 2025

🐛 Bug Description

To Reproduce

Steps to reproduce the behavior:

  1. Follow the example to download PIT data.
    python collector.py download_data --source_dir ~/.qlib/stock_data/source/pit --start 2000-01-01 --end 2020-01-01 --interval quarterly
  2. Get this error
Traceback (most recent call last):
  File "E:\Git\qlib\scripts\data_collector\pit\collector.py", line 261, in <module>
    fire.Fire(Run)
  File "C:\veighna_studio\lib\site-packages\fire\core.py", line 135, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "C:\veighna_studio\lib\site-packages\fire\core.py", line 468, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "C:\veighna_studio\lib\site-packages\fire\core.py", line 684, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "E:\Git\qlib\scripts\data_collector\base.py", line 402, in download_data
    _class(
  File "E:\Git\qlib\scripts\data_collector\pit\collector.py", line 69, in __init__
    super().__init__(
  File "E:\Git\qlib\scripts\data_collector\base.py", line 80, in __init__
    self.instrument_list = sorted(set(self.get_instrument_list()))
  File "E:\Git\qlib\scripts\data_collector\pit\collector.py", line 83, in get_instrument_list
    symbols = get_hs_stock_symbols()
  File "E:\Git\qlib\scripts\data_collector\utils.py", line 235, in get_hs_stock_symbols
    symbols |= _get_symbol()
  File "E:\Git\qlib\scripts\data_collector\utils.py", line 219, in _get_symbol
    raise ValueError("The complete list of stocks is not available.")
ValueError: The complete list of stocks is not available.
(pit)

Expected Behavior

No error occurs and we fetch the data successfully.

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.

  • Qlib version:
  • Python version:
  • OS (Windows, Linux, MacOS): Windows
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

The possible problem is that this API is not returning the full list of 5000+ symbols, but only part of it.

If we want the full list, it must be sourced from somewhere else.

@hlstwizard hlstwizard added the bug Something isn't working label Mar 6, 2025
fibers pushed a commit to fibers/qlib that referenced this issue Mar 28, 2025
fibers pushed a commit to fibers/qlib that referenced this issue Mar 28, 2025
@fibers fibers mentioned this issue Mar 28, 2025
5 tasks
@sysy007uuu
Copy link

I count the same error, how can I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants