307 views
0

2020.7.7晚8:50~9:10,程序登录时报出异常然后退出。
反复重启程序多次后登录成功。

在使用天勤量化之前,默认您已经知晓并同意以下免责条款,如果不同意请立即停止使用:https://www.shinnytech.com/blog/disclaimer/
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f2f6d68f7b8>
transport: <_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 227, in __init__
if not self.wait_update(deadline=deadline): # 等待连接成功并收取截面数据
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 882, in wait_update
self._run_once()
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1556, in _run_once
raise self._exceptions.pop(0)
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1625, in _connect
async with websockets.connect(url, **keywords) as client:
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 517, in __aenter__
return await self
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 547, in __await_impl__
extra_headers=protocol.extra_headers,
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 296, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.7/asyncio/sslproto.py”, line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File “/usr/lib/python3.7/asyncio/sslproto.py”, line 207, in feed_ssldata
self._sslobj.unwrap()
File “/usr/lib/python3.7/ssl.py”, line 767, in unwrap
return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2609)
Traceback (most recent call last):
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 227, in __init__
if not self.wait_update(deadline=deadline): # 等待连接成功并收取截面数据
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 882, in wait_update
self._run_once()
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1556, in _run_once
raise self._exceptions.pop(0)
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1625, in _connect
async with websockets.connect(url, **keywords) as client:
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 517, in __aenter__
return await self
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 547, in __await_impl__
extra_headers=protocol.extra_headers,
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 296, in handshake
raise InvalidStatusCode(status_code)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 500

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 101, in read_http_response
status_code, reason, headers = await read_response(self.reader)
File “/usr/local/lib/python3.7/dist-packages/websockets/http.py”, line 139, in read_response
status_line = await read_line(stream)
File “/usr/local/lib/python3.7/dist-packages/websockets/http.py”, line 213, in read_line
line = await stream.readline()
File “/usr/lib/python3.7/asyncio/streams.py”, line 496, in readline
line = await self.readuntil(sep)
File “/usr/lib/python3.7/asyncio/streams.py”, line 588, in readuntil
await self._wait_for_data(‘readuntil’)
File “/usr/lib/python3.7/asyncio/streams.py”, line 473, in _wait_for_data
await self._waiter
concurrent.futures._base.CancelledError

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

Traceback (most recent call last):
File “test.py”, line 37, in <module>
api = TqApi(TqAccount(x))# , web_gui=”:1111″)
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 230, in __init__
self.close()
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 278, in close
self._run_once()
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1556, in _run_once
raise self._exceptions.pop(0)
File “/usr/local/lib/python3.7/dist-packages/tqsdk/api.py”, line 1625, in _connect
async with websockets.connect(url, **keywords) as client:
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 517, in __aenter__
return await self
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 547, in __await_impl__
extra_headers=protocol.extra_headers,
File “/usr/local/lib/python3.7/dist-packages/websockets/client.py”, line 290, in handshake
status_code, response_headers = await self.read_http_response()
File “/usr/local/lib/python3.7/dist-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

Unselected an answer
0

哪家期货公司呢

Posted new comment

国金期货

这些天一直如此