Closed Yuwenqing closed 6 years ago
麻烦查看下您的 requests 库版本
pip list
并尝试更新 requests 库
pip install -U requests
RQAlpha的版本 3,0,9
Python的版本 64 3.5.4
是Windows/Linux/MacOS or others? Linux debian9 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux 本地的locale设置: LANG=zh_CN.UTF-8 LANGUAGE=zh_CN:zh LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL=
您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置 运行 rqalpha update_bundle时出错
您出现的错误堆栈日志信息
Traceback (most recent call last):
File "/home/fp862/anaconda3/envs/fpricequant/bin/rqalpha", line 11, in
想来是locale设置问题,必须设置为en_US.UTF-8么? 与#215号问题类似,找到答案了。
1. RQAlpha的版本
3,0,9
2. Python的版本
64 3.5.2
3. 是Windows/Linux/MacOS or others?
Windows 10 64位
4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置
5. 您出现的错误堆栈日志信息
尝试 http://7xjci3.com1.z0.glb.clouddn.com/bundles_v3/rqbundle_20180429.tar.bz2 ... Traceback (most recent call last): File "c:\anaconda3\lib\runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "c:\anaconda3\lib\runpy.py", line 85, in _run_code [35;1mexec[m(code, run_globals) [36m │ └ {'cached': 'C:\Anaconda3\Scripts\rqalpha.exe\pycache\main.cpython-35.pyc', 'package': '', 'spec': Modul...[m [36m └ <code object at 0x000001E5E1654C90, file "C:\Anaconda3\Scripts\rqalpha.exe__main.py", line 2>[m
File "C:\Anaconda3\Scripts\rqalpha.exe__main.py", line 9, in
sys.exit(entry_point())
[36m│ └ <function entry_point at 0x000001E5EC99FF28>[m
[36m└ <module 'sys' (built-in)>[m
File "c:\anaconda3\lib\site-packages\rqalpha\ main__.py", line 70, in entry_point
cli(obj={})
[36m└ <click.core.Group object at 0x000001E5EB925D68>[m
File "c:\anaconda3\lib\site-packages\click\core.py", line 716, in call__
[33;1mreturn[m self.main(args, kwargs)
[36m │ │ └ {'obj': {'VERBOSE': 0}}[m
[36m │ └ ()[m
[36m └ <click.core.Group object at 0x000001E5EB925D68>[m
File "c:\anaconda3\lib\site-packages\click\core.py", line 696, in main
rv = self.invoke(ctx)
[36m │ └ <click.core.Context object at 0x000001E5E0D97AC8>[m
[36m └ <click.core.Group object at 0x000001E5EB925D68>[m
File "c:\anaconda3\lib\site-packages\click\core.py", line 1060, in invoke
[33;1mreturn[m _process_result(sub_ctx.command.invoke(sub_ctx))
[36m │ │ └ <click.core.Context object at 0x000001E5EC9F16A0>[m
[36m │ └ <click.core.Context object at 0x000001E5EC9F16A0>[m
[36m └ <function MultiCommand.invoke.._process_result at 0x000001E5ECA11E18>[m
File "c:\anaconda3\lib\site-packages\click\core.py", line 889, in invoke
[33;1mreturn[m ctx.invoke(self.callback, ctx.params)
[36m │ │ └ <click.core.Context object at 0x000001E5EC9F16A0>[m
[36m │ └ <click.core.Command object at 0x000001E5EC9A21D0>[m
[36m └ <click.core.Context object at 0x000001E5EC9F16A0>[m
File "c:\anaconda3\lib\site-packages\click\core.py", line 534, in invoke
[33;1mreturn[m callback(args, **kwargs)
[36m │ │ └ {'locale': 'zh_Hans_CN', 'data_bundle_path': 'C:\Users\Yuwenqing/.rqalpha'}[m
[36m │ └ ()[m
[36m └ <function update_bundle at 0x000001E5EC9A4378>[m
File "c:\anaconda3\lib\site-packages\rqalpha__main__.py", line 81, in update_bundle
main.update_bundle(data_bundle_path, locale)
[36m│ │ └ 'zh_Hans_CN'[m
[36m│ └ 'C:\Users\Yuwenqing/.rqalpha'[m
[36m└ <module 'rqalpha.main' from 'c:\anaconda3\lib\site-packages\rqalpha\main.py'>[m
File "c:\anaconda3\lib\site-packages\rqalpha\main.py", line 153, in update_bundle
r = requests.get(url, stream=True)
[36m │ └ 'http://7xjci3.com1.z0.glb.clouddn.com/bundles_v3/rqbundle_20180429.tar.bz2'[m
[36m └ <module 'requests' (namespace)>[m
AttributeError: module 'requests' has no attribute 'get'