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

我运行vnpy mod报错,具体信息如下: #5

Closed
FallacyWalker opened this issue Apr 11, 2017 · 9 comments
Closed

我运行vnpy mod报错,具体信息如下: #5

FallacyWalker opened this issue Apr 11, 2017 · 9 comments
Labels

Comments

@FallacyWalker
Copy link

FallacyWalker commented Apr 11, 2017

OS: Ubuntu 16.04
Python 2.7.12
rqalpha-mod-vnpy: 0.9.11
rqalpha: 2.0.9

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/Vnpy/vnpy/vn.trader/eventEngine.py", line 218, in __run
self.__process(event)
File "/home/Vnpy/vnpy/vn.trader/eventEngine.py", line 228, in __process
[handler(event) for handler in self._handlers[event.type]]
File "/home/RqalphaNew/rqalpha/rqalpha/mod/rqalpha_mod_vnpy/vnpy_engine.py", line 254, in
self.event_engine.register(EVENT_ERROR, lambda e: system_log.error(e['data']))
AttributeError: Event instance has no attribute 'getitem'

Traceback (most recent call last):
File "/home/RqalphaNew/rqalpha/rqalpha/main.py", line 191, in run
mod_handler.start_up()
└ <rqalpha.mod.ModHandler object at 0x7fb9c50f63d0>
File "/home/RqalphaNew/rqalpha/rqalpha/mod/init.py", line 67, in start_up
self._mod_dict[mod_name].start_up(self.env, mod_config)
│ │ │ └ {'commission_multiplier': 1,
'enabled': True,
'matching_type': MATCHING_TYPE.CURRENT_BAR_CLOSE,
'price_limit': True,
'signal...
│ │ └ <rqalpha.mod.ModHandler object at 0x7fb9c50f63d0>
│ └ 'sys_simulation'
└ <rqalpha.mod.ModHandler object at 0x7fb9c50f63d0>
File "/home/RqalphaNew/rqalpha/rqalpha/mod/rqalpha_mod_sys_simulation/mod.py", line 47, in start_up
raise RuntimeError(
("Not supported matching type {}").format(mod_config.matching_type))
│ └ {'commission_multiplier': 1,
'enabled': True,
'matching_type': MATCHING_TYPE.CURRENT_BAR_CLOSE,
'price_limit': True,
'signal...
└ <function gettext at 0x7fb9d118c9b0>
RuntimeError: 不支持撮合类型: MATCHING_TYPE.CURRENT_BAR_CLOSE
0000-00-00 ERROR 不支持撮合类型: MATCHING_TYPE.CURRENT_BAR_CLOSE
[2017-04-11 16:01:00.747647] ERROR: system_log: 策略运行产生异常
Traceback (most recent call last):
File "/home/RqalphaNew/rqalpha/rqalpha/main.py", line 191, in run
mod_handler.start_up()
File "/home/RqalphaNew/rqalpha/rqalpha/mod/init.py", line 67, in start_up
self._mod_dict[mod_name].start_up(self.env, mod_config)
File "/home/RqalphaNew/rqalpha/rqalpha/mod/rqalpha_mod_sys_simulation/mod.py", line 47, in start_up
raise RuntimeError(
("Not supported matching type {}").format(mod_config.matching_type))
RuntimeError: 不支持撮合类型: MATCHING_TYPE.CURRENT_BAR_CLOSE

@FallacyWalker
Copy link
Author

FallacyWalker commented Apr 11, 2017

不好意思,提重了,不过Ubuntu上 .rqalpha文件夹下没有找到配置文件;

@Cuizi7
Copy link
Collaborator

Cuizi7 commented Apr 13, 2017

File "/home/RqalphaNew/rqalpha/rqalpha/mod/rqalpha_mod_vnpy/vnpy_engine.py", line 254, in
self.event_engine.register(EVENT_ERROR, lambda e: system_log.error(e['data']))
AttributeError: Event instance has no attribute 'getitem'

这个错误已在 0.9.13 中修复

@Cuizi7
Copy link
Collaborator

Cuizi7 commented Apr 13, 2017

另外目前运行 vnpy mod 需要手动关闭 simulation mod

@Cuizi7 Cuizi7 closed this as completed Apr 13, 2017
@wh1100717
Copy link
Member

@Cuizi7 我觉得vnpy-mod 运行时应该检测冲突Mod是否开启,如果开启的话,给一个提示,然后退出。这样比较好。

@Cuizi7
Copy link
Collaborator

Cuizi7 commented Apr 13, 2017

@wh1100717 好的,之后加入这个功能。

@hzliu
Copy link

hzliu commented Apr 13, 2017 via email

@FallacyWalker
Copy link
Author

如何手动关闭simulation mod 呢 ?

@wh1100717
Copy link
Member

@FallacyWalker
Copy link
Author

不支持撮合类型的错误是bug吗?

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

No branches or pull requests

4 participants