2.20K 浏览
0

在使用天勤量化之前,默认您已经知晓并同意以下免责条款,如果不同意请立即停止使用:https://www.shinnytech.com/blog/disclaimer/
2021-08-27 11:08:56 – INFO – 通知: 登录成功
2021-08-27 11:08:56 – INFO – 通知: 与 wss://otg-sim.shinnytech.com/trade 的网络连接已建立
2021-08-27 11:08:56 – INFO – 通知: 与 wss://free-api.shinnytech.com/t/nfmd/front/mobile 的网络连接已建立
Task was destroyed but it is pending!
task: <Task pending name=’Task-1′ coro=<TqBaseApi._windows_patch() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py:101> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44DC0>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-2′ coro=<TqApi._notify_watcher() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\api.py:3240> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5711CB80>()]> cb=[TqBaseApi._on_task_done()]>
Exception ignored in: <coroutine object TqApi._notify_watcher at 0x000001BC544088C0>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\api.py”, line 3240, in _notify_watcher
async for _ in update_chan:
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\channel.py”, line 141, in __anext__
value = await asyncio.Queue.get(self)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\queues.py”, line 168, in get
getter.cancel() # Just in case getter is not done yet.
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-3′ coro=<TqConnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:165> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5B8CB670>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-4′ coro=<TqReconnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:243> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44A00>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-5′ coro=<TqSymbols._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\symbols.py:26> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59E68370>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-6′ coro=<TqConnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:165> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5711CE80>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-7′ coro=<TqReconnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:243> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59E68430>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-8′ coro=<TqAccount._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\account.py:114> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44C10>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-9′ coro=<TqWebHelper._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\tqwebhelper.py:80> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5A654EE0>()]> cb=[TqBaseApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-10′ coro=<DataExtension._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\data_extension.py:50> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5B8CB6A0>()]> cb=[TqBaseApi._on_task_done()]>
Exception ignored in: <coroutine object TqConnect._run at 0x000001BC54367BC0>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py”, line 207, in _run
await asyncio.sleep(sleep_seconds)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py”, line 643, in sleep
loop = events.get_running_loop()
RuntimeError: no running event loop
C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\decoder.py:400: RuntimeWarning: coroutine ‘WebSocketCommonProtocol.write_close_frame’ was never awaited
return self.scan_once(s, idx=_w(s, idx).end())
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Task was destroyed but it is pending!
task: <Task pending name=’Task-26′ coro=<TqConnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:214> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqReconnect._run at 0x000001BC54367940>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py”, line 293, in _run
send_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-11′ coro=<TqReconnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:297> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqSymbols._run at 0x000001BC54367440>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\symbols.py”, line 48, in _run
sim_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-12′ coro=<TqSymbols._sim_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\symbols.py:53> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqConnect._run at 0x000001BC54367740>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py”, line 207, in _run
await asyncio.sleep(sleep_seconds)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py”, line 643, in sleep
loop = events.get_running_loop()
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name=’Task-22′ coro=<TqConnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:214> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqReconnect._run at 0x000001BC54408F40>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py”, line 293, in _run
send_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-13′ coro=<TqReconnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\connect.py:297> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqAccount._run at 0x000001BC54408A40>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\account.py”, line 132, in _run
md_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-14′ coro=<TqAccount._md_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\account.py:146> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqWebHelper._run at 0x000001BC54408D40>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\tqwebhelper.py”, line 85, in _run
_data_handler_without_web_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-16′ coro=<TqWebHelper._data_handler_without_web() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\tqwebhelper.py:167> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object DataExtension._run at 0x000001BC54408C40>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\data_extension.py”, line 67, in _run
md_task.cancel()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-17′ coro=<DataExtension._md_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\data_extension.py:71> wait_for=<Future cancelled>>
Task was destroyed but it is pending!
task: <Task pending name=’Task-15′ coro=<TqAccount._td_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\account.py:155> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44BB0>()]>>
Exception ignored in: <coroutine object TqAccount._td_handler at 0x000001BC5A328AC0>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\account.py”, line 155, in _td_handler
async for pack in td_recv_chan:
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\channel.py”, line 141, in __anext__
value = await asyncio.Queue.get(self)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\queues.py”, line 168, in get
getter.cancel() # Just in case getter is not done yet.
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending name=’Task-19′ coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:750> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5A654CD0>()]> cb=[<TaskWakeupMethWrapper object at 0x000001BC59E68A30>()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-20′ coro=<WebSocketCommonProtocol.keepalive_ping() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:1043> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59E68A90>()]>>
Task was destroyed but it is pending!
task: <Task pending name=’Task-21′ coro=<WebSocketCommonProtocol.close_connection() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:1095> wait_for=<Task pending name=’Task-19′ coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:750> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5A654CD0>()]> cb=[<TaskWakeupMethWrapper object at 0x000001BC59E68A30>()]>>
Task was destroyed but it is pending!
task: <Task pending name=’Task-23′ coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:750> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5711C700>()]> cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44C70>()]>
Task was destroyed but it is pending!
task: <Task pending name=’Task-24′ coro=<WebSocketCommonProtocol.keepalive_ping() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:1043> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44CD0>()]>>
Task was destroyed but it is pending!
task: <Task pending name=’Task-25′ coro=<WebSocketCommonProtocol.close_connection() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:1095> wait_for=<Task pending name=’Task-23′ coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py:750> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001BC5711C700>()]> cb=[<TaskWakeupMethWrapper object at 0x000001BC59C44C70>()]>>
Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x000001BC59E68520>
transport: <_SelectorSocketTransport closing fd=2932>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1095, in close_connection
await self.transfer_data_task
GeneratorExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 918, in write
n = self._sock.send(data)
OSError: [WinError 10038] 在一个非套接字上尝试了一个操作。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py”, line 684, in _process_write_backlog
self._transport.write(chunk)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 924, in write
self._fatal_error(exc, ‘Fatal write error on socket transport’)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 719, in _fatal_error
self._force_close(exc)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 731, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x000001BC59B25940>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1136, in close_connection
if await self.wait_for_connection_lost():
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1158, in wait_for_connection_lost
await asyncio.wait_for(
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py”, line 435, in wait_for
loop = events.get_running_loop()
RuntimeError: no running event loop
Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x000001BC59E68070>
transport: <_SelectorSocketTransport closing fd=2912>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1095, in close_connection
await self.transfer_data_task
GeneratorExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 918, in write
n = self._sock.send(data)
OSError: [WinError 10038] 在一个非套接字上尝试了一个操作。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\sslproto.py”, line 684, in _process_write_backlog
self._transport.write(chunk)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 924, in write
self._fatal_error(exc, ‘Fatal write error on socket transport’)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 719, in _fatal_error
self._force_close(exc)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py”, line 731, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\baseApi.py”, line 48, in _call_soon
return org_call_soon(callback, *args, **kargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 746, in call_soon
self._check_closed()
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py”, line 510, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x000001BC59F4D1C0>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1136, in close_connection
if await self.wait_for_connection_lost():
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\websockets\legacy\protocol.py”, line 1158, in wait_for_connection_lost
await asyncio.wait_for(
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\tasks.py”, line 435, in wait_for
loop = events.get_running_loop()
RuntimeError: no running event loop
Task was destroyed but it is pending!
task: <Task pending name=’Task-28′ coro=<TqDataFrame.async_update() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\tqsdk\objs_not_entity.py:196> wait_for=<Future finished result=None> cb=[TqBaseApi._on_task_done()]>
2021-08-27 11:09:02 – INFO – 通知: 与 wss://otg-sim.shinnytech.com/trade 的网络连接已建立
2021-08-27 11:09:02 – INFO – 通知: 与 wss://free-api.shinnytech.com/t/nfmd/front/mobile 的网络连接已建立
2021-08-27 11:09:02 – INFO – 通知: 登录成功
Task was destroyed but it is pending!

李思恒 已回答的问题 2021年8月30日
1

大概估计是你没有正确关闭api,试一下在运行完以后加一个api.close()

李思恒 已回答的问题 2021年8月30日
您正在查看1个答案中的1个,单击此处查看所有答案。