3.23K 浏览
0

2020-10-12 21:23:46,814 – WARNING – 通知: 与 wss://free-api.shinnytech.com/t/nfmd/front/mobile 的网络连接断开,请检查客户端及网络是否正常
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\client.py”, line 101, in read_http_response
status_code, reason, headers = await read_response(self.reader)
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\http.py”, line 139, in read_response
status_line = await read_line(stream)
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\http.py”, line 213, in read_line
line = await stream.readline()
File “C:\ProgramData\Anaconda3\lib\asyncio\streams.py”, line 540, in readline
line = await self.readuntil(sep)
File “C:\ProgramData\Anaconda3\lib\asyncio\streams.py”, line 632, in readuntil
await self._wait_for_data(‘readuntil’)
File “C:\ProgramData\Anaconda3\lib\asyncio\streams.py”, line 517, in _wait_for_data
await self._waiter
File “C:\ProgramData\Anaconda3\lib\asyncio\selector_events.py”, line 846, in _read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “main.py”, line 316, in <module>
main()
File “main.py”, line 310, in main
engine,model=model_main(symbol,strategy,egines_paras,day_trade,resart,engine,model)
File “main.py”, line 158, in model_main
model_run(symbol,mode,model)
File “main.py”, line 118, in model_run
updated=model.wait(time_out)
File “D:\Andy\qt_test\base.py”, line 489, in wait
return self.cta_engine.wait_update(time_out)
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 1219, in wait_update
self._run_once()
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 2203, in _run_once
raise self._exceptions.pop(0)
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 2272, in _connect
async with websockets.connect(url, **keywords) as client:
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\client.py”, line 517, in __aenter__
return await self
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\client.py”, line 542, in __await_impl__
await protocol.handshake(
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\client.py”, line 290, in handshake
status_code, response_headers = await self.read_http_response()
File “C:\ProgramData\Anaconda3\lib\site-packages\websockets\client.py”, line 103, in read_http_response
raise InvalidMessage(“did not receive a valid HTTP response”) from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response

ringo 已回答的问题 2020年10月13日