vn.py官网
开源量化社区
Member
加入于:
帖子: 23
声望: 0

用的香港Windows VPS

[2020-11-29T19:26:22.455654]: Unhandled RestClient Error:<class 'requests.exceptions.ConnectionError'>
request:request : PUT /fapi/v1/listenKey?listenKey=Yw6a8CRq3cZuwOO1BVfV4EJ6h05njJV4hdSCf2Bc73AsX3okkFoCfv9c5fmSgOw
r because terminated:
headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', 'X-MBX-APIKEY': 'kLAy
SzyAhRgMrTk4pyYrUYzs0AnOOhzlPjQ7a3xb8xgcntG3RlNToR0s86'}
params: {}
data: {}
response:

Exception trace:
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\vnstudio\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\vnstudio\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\vnstudio\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\vnstudio\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\vnstudio\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "C:\vnstudio\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\vnstudio\lib\site-packages\urllib3\util\retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\vnstudio\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
raise value.with_traceback(tb)
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\vnstudio\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\vnstudio\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\vnstudio\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\vnstudio\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\vnstudio\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "C:\vnstudio\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的
。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\api\rest\rest_client.py", line 262, in _process_request
proxies=self.proxies,
File "C:\vnstudio\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\vnstudio\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request,
kwargs)
File "C:\vnstudio\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现
接。', None, 10054, None))
Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\vnstudio\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\vnstudio\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\vnstudio\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\vnstudio\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\vnstudio\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "C:\vnstudio\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "C:\vnstudio\lib\site-packages\urllib3\util\retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\vnstudio\lib\site-packages\urllib3\packages\six.py", line 734, in reraise
raise value.with_traceback(tb)
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 677, in urlopen
chunked=chunked,
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\vnstudio\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\vnstudio\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\vnstudio\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\vnstudio\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\vnstudio\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\vnstudio\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "C:\vnstudio\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的
。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\vnstudio\lib\site-packages\vnpy\api\rest\rest_client.py", line 262, in _process_request
proxies=self.proxies,
File "C:\vnstudio\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\vnstudio\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request,
kwargs)
File "C:\vnstudio\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现
接。', None, 10054, None))
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
QWidget::repaint: Recursive repaint detected
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBasicTimer::start: Timers cannot be started from another thread
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?

Member
avatar
加入于:
帖子: 2357
声望: 148

请问是什么系统呢?还有电脑是否安装了360之类的杀毒软件吗?

Administrator
avatar
加入于:
帖子: 4749
声望: 278

这个报错是网络连接超时导致的:

File "C:\vnstudio\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, kwargs)
File "C:\vnstudio\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现
接。', None, 10054, None))

币安的服务器在日本AWS,如果这个情况频繁出现的话,建议换一个云服务器,比如香港的阿里云或者AWS

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号