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

有没有人碰到Python客户端出现无反应的状况? #158

Closed
shirubei opened this issue Aug 11, 2022 · 4 comments
Closed

有没有人碰到Python客户端出现无反应的状况? #158

shirubei opened this issue Aug 11, 2022 · 4 comments

Comments

@shirubei
Copy link

用的Python客户端,接收消息时会打出log。偶尔会出现无反应的状况,比如说,最近1小时内微信界面上显示收到好几条新消息了,但log这边的窗口中,最后一条log是在1小时前的,之后什么都没有。仿佛在那个时间点堵住了。
然后这个时候,鼠标点一下log窗口(保证log窗口是激活的状态),按回车键,就哗哗哗打出那几条新消息来。
出现的频率不高(具体也不好说,1天出现几回,或者几天出现一回都有可能),而且是随机行的,目前还没有找到规律。
不知道是我自己客户端代码的问题,查了好久了,一直没有结果。

@cixingguangming55555
Copy link
Owner

你去QQ群问问呢,看有没有其他人遇到过

@shirubei
Copy link
Author

你去QQ群问问呢,看有没有其他人遇到过

好的,多谢啊!

@shirubei
Copy link
Author

你去QQ群问问呢,看有没有其他人遇到过

感觉应该是websocket-client的问题。他们给的建议是, ws.run_forever(ping_interval = 60) , 就是说要把 ping_interval 设上。我观察2天,没有问题就把这个issue给关了。

@shirubei
Copy link
Author

找到上述问题的类似案例, sammchardy/python-binance#268 人家说是命令行窗口自己的问题。说只要把 快速编辑模式 去掉就OK了。以下python代码把快速编辑模式和插入模式都关闭。
import ctypes
kernel32 = ctypes.windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-10), 128) #disable qiuck edit mode and Insert mode

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