Skip to content
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

normalize.py 出现网络错误 #43

Open
rain1475 opened this issue Apr 12, 2024 · 3 comments
Open

normalize.py 出现网络错误 #43

rain1475 opened this issue Apr 12, 2024 · 3 comments

Comments

@rain1475
Copy link

发现获取日历的时候被深交所www.szse.cn屏蔽,正常浏览器都无法访问深交所。
怀疑访问过于频繁,是否应该加一个delay?

日志
C:\Projects\Quant\Quant1\bin\Debug\net7.0>python ./normalize.py normalize_data --source_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output\ --normalize_dir C:\Projects\Quant\Quant1\bin\Debug\net7.0\output_normalize\ --max_workers=28 --date_field_name="tradedate"
2024-04-12 18:31:40.760 | INFO | data_collector.utils:get_calendar_list:68 - get calendar list: ALL......
2024-04-12 18:33:17.852 | WARNING | data_collector.utils:wrapper:491 - _get_calendar: 1 :2000-01-->HTTPConnectionPool(host='www.szse.cn', port=80): Read timed out. (read timeout=None)

@chenditc
Copy link
Owner

@rain1475 试过换个 ip 就能访问了么?

@rain1475
Copy link
Author

@rain1475 试过换个 ip 就能访问了么?

换ip可以访问,等5-30分钟也可恢复访问,最长也试过等1个半小时才恢复访问。

@chenditc
Copy link
Owner

这个代码似乎是 qlib 项目里的,我只引用了 qlib 里的库,如果要优化的话,可以贡献到 qlib 项目里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants