Comments (5)
请问使用的是最新的2.3.0版本吗?
from vnpy_rest.
对的。在vnpy中,开了同样一个帖子。链接地址:https://github.com/vnpy/vnpy/issues/3022。所以内容在那里补充一下。
环境
操作系统: Windows 10
Python版本: python3.7
vn.py版本: v2.3.0
Issue类型
三选一:Question
预期程序行为
针对Okex接口,设计了断开重连的代码,调用self.gateway.close(),之后调用self.gateway.connect()。预期gateway能继续连接上交易所数据。
实际程序行为
调用过程中,报错出现在self.gateway.connect()中,在调用OkexRestApi.connect中的self.start(session_number)报错。在启用start_event_loop()中报错。
重现步骤
针对Bug类型Issue,请提供具体重现步骤以及报错截图,流程:
self.gateway.close()(完成不报错)-->self.gateway.connect(报错)-->OkexRestApi.connect-->错误出现在start_event_loop
image
报错信息:There is no current event loop in thread 'Thread-6'
from vnpy_rest.
收到,我们一起来排查下
from vnpy_rest.
没问题,我这里提供我的试错经验。我查了网上的解决办法:
1.很多中文帖子,建议这种解决办法:https://blog.csdn.net/longe20111104/article/details/116641176。也出现报错。它是建议直接建一个新的事件循环
2.这个帖子,我认为是为啥上述方法解决不到的主要原因【“在主线程中,调用get_event_loop总能返回属于主线程的event loop对象,如果是处于非主线程中,还需要调用set_event_loop方法指定一个event loop对象,这样get_event_loop才会获取到被标记的event loop对象:”】,但我看得不太明白。https://www.cnblogs.com/SunshineKimi/p/12053914.html。请大佬过目
from vnpy_rest.
已修复
from vnpy_rest.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vnpy_rest.