285 views
0

当登录账户后

提示出:

C:\Users\Administrator\PycharmProjects\pythonProject3\venv\Scripts\python.exe C:/Users/Administrator/PycharmProjects/pythonProject3/sadfa/sdafavc.py
在使用天勤量化之前,默认您已经知晓并同意以下免责条款,如果不同意请立即停止使用:https://www.shinnytech.com/blog/disclaimer/
2020-12-22 15:11:15 – INFO – 通知: 与 wss://free-api.shinnytech.com/t/nfmd/front/mobile 的网络连接已建立
Task was destroyed but it is pending!
task: <Task pending coro=<TqApi._windows_patch() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py:2477> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002EE62228>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqApi._notify_watcher() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py:2485> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x00000000256116A8>()]> cb=[TqApi._on_task_done()]>
Exception ignored in: <coroutine object TqApi._notify_watcher at 0x00000000255ECEC8>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py”, line 2485, in _notify_watcher
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\channel.py”, line 138, in __anext__
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\queues.py”, line 161, in get
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py”, line 1986, in _call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 691, in call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<TqConnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py:84> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000035EA7648>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqReconnect._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py:142> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002A4CE3A8>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<_run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\sim.py:105> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000038A3F708>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqWebHelper._run() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\tqwebhelper.py:79> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000027B331F8>()]> cb=[TqApi._on_task_done()]>
Exception ignored in: <coroutine object TqConnect._run at 0x00000000255CE448>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py”, line 90, in _run
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\client.py”, line 525, in __aexit__
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py”, line 679, in close
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py”, line 426, in wait_for
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 660, in call_later
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 670, in call_at
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed
sys:1: RuntimeWarning: coroutine ‘WebSocketCommonProtocol.write_close_frame’ was never awaited
Task was destroyed but it is pending!
task: <Task pending coro=<TqConnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py:121> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqReconnect._run at 0x00000000255EC8C8>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py”, line 185, in _run
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py”, line 1986, in _call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 691, in call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<TqReconnect._send_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\connect.py:189> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object _run at 0x00000000255EC848>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\sim.py”, line 154, in _run
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\sim.py”, line 197, in _send_stat_report
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\channel.py”, line 70, in send
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\queues.py”, line 136, in put
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\queues.py”, line 148, in put_nowait
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\queues.py”, line 66, in _wakeup_next
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py”, line 1986, in _call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 691, in call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <coroutine object TqWebHelper._run at 0x00000000255ECF48>
RuntimeError: coroutine ignored GeneratorExit
Task was destroyed but it is pending!
task: <Task cancelling coro=<TqWebHelper._data_handler_without_web() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\tqwebhelper.py:158> wait_for=<Future finished result=None> cb=[gather.<locals>._done_callback() at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py:691]>
Task was destroyed but it is pending!
task: <Task pending coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py:827> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002EE622B8>()]> cb=[<TaskWakeupMethWrapper object at 0x000000002EE38F48>()]>
Task was destroyed but it is pending!
task: <Task pending coro=<WebSocketCommonProtocol.keepalive_ping() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py:1121> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002EE38EE8>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<WebSocketCommonProtocol.close_connection() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py:1169> wait_for=<Task pending coro=<WebSocketCommonProtocol.transfer_data() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py:827> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002EE622B8>()]> cb=[<TaskWakeupMethWrapper object at 0x000000002EE38F48>()]>>
Exception ignored in: <coroutine object WebSocketCommonProtocol.close_connection at 0x000000002A3528C8>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py”, line 1206, in close_connection
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py”, line 1229, in wait_for_connection_lost
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py”, line 426, in wait_for
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 660, in call_later
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 670, in call_at
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<TqSim._md_handler() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\sim.py:163> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000000002A4CE1C8>()]>>
Exception ignored in: <coroutine object TqSim._md_handler at 0x000000002AD41AC8>
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\sim.py”, line 163, in _md_handler
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\channel.py”, line 138, in __anext__
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\queues.py”, line 161, in get
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\tqsdk\api.py”, line 1986, in _call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 691, in call_soon
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 479, in _check_closed
RuntimeError: Event loop is closed

进程已结束,退出代码0

Answered question
0

猜测是结尾没加上

api.close()

Answered question