653 浏览
0

下面是错误提示,请问有人知道是什么原因吗?

在使用天勤量化之前,默认您已经知晓并同意以下免责条款,如果不同意请立即停止使用:https://www.shinnytech.com/blog/disclaimer/
Tqsdk 发布了 3.5.8 (2024/04/29) 版本,优化了DataDownloader 在下载没有任何成交数据的合约时能够及时退出,避免等待超时或报错等问题
Traceback (most recent call last):
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\client.py”, line 647, in __await_impl_timeout__
return await self.__await_impl__()
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\client.py”, line 651, in __await_impl__
_transport, _protocol = await self._create_connection()
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py”, line 1060, in create_connection
sock = await self._connect_sock(
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py”, line 969, in _connect_sock
await self.sock_connect(sock, address)
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\asyncio\selector_events.py”, line 501, in sock_connect
return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\auto511\autoday\day3\map\14_纯碱_oneday.py”, line 132, in <module>
stock_df = get_stock(‘fg2301’)
File “C:\auto511\autoday\day3\map\14_纯碱_oneday.py”, line 35, in get_stock
api = TqApi(auth=TqAuth(“xxxxx”,”xxxxx”))
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\tqsdk\api.py”, line 295, in __init__
if not self.wait_update(deadline=deadline): # 等待连接成功并收取截面数据
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\tqsdk\api.py”, line 1903, in wait_update
self._run_until_task_done(task=update_task, deadline=deadline)
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\tqsdk\baseApi.py”, line 88, in _run_until_task_done
self._run_once()
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\tqsdk\baseApi.py”, line 57, in _run_once
raise self._exceptions.pop(0)
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\tqsdk\connect.py”, line 157, in _run
async with websockets.connect(url, **self._keywords) as client:
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\client.py”, line 629, in __aenter__
return await self
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\client.py”, line 646, in __await_impl_timeout__
async with asyncio_timeout(self.open_timeout):
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\async_timeout.py”, line 169, in __aexit__
self._do_exit(exc_type)
File “C:\Users\shaoy\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\async_timeout.py”, line 252, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

simonou 问的问题 2024年5月17日