vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 3
声望: 0

(已经解决)


https://zhuanlan.zhihu.com/p/103834397 按照这个文章的说法,在在/vnpy/trader目录下建立tuquery.py文件下建立了文件,然后同时在/vnpy/app/cta_backtester目录下找到engine.py,导入包

from vnpy.trader.tuquery import tusharedata
在run_downloading函数下找到“try:”,if……else:这里将原来的

data = rqdata_client.query_history(req)

发现报错之后,我把原文件换了回去,但是还是报错。

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "c:\vnstudio\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\
init__.py", line 5, in <module>
from .engine import BacktesterEngine, APP_NAME
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 8, in <module>
from vnpy.trader.tuquery import tusharedata
ModuleNotFoundError: No module named 'vnpy.trader.tuquery'

重启了还是不行,难不成要重装?

已经解决了

Administrator
avatar
加入于:
帖子: 5091
声望: 294

请卸载后重装即可

Member
avatar
加入于:
帖子: 1
声望: 0

怎么解决的/

Member
avatar
加入于:
帖子: 34
声望: 2

用Python的交易员 wrote:

请卸载后重装即可
请问老大,卸载什么后重装?重装tushare还是VNPY?

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号