节前申请了专业试用版,节中尝试出错,节后继续尝试仍然有问题。在节前的那个版本运行都一点问题都没有。
报错代码:
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<TqApi._connect() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py:1883> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000012504318>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqBacktest._run() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\backtest.py:118> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x00000000125042E8>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqSim._run() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\sim.py:103> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000012504A68>()]> cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro=<TqWebHelper._run() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\tqwebhelper.py:111> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000000012504AF8>()]> cb=[TqApi._on_task_done()]>
Exception ignored in: <coroutine object TqBacktest._run at 0x000000001229A8C8>
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\backtest.py”, line 132, in _run
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\backtest.py”, line 303, in _gen_serial
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\channel.py”, line 110, in __anext__
File “C:\ProgramData\Anaconda3\lib\asyncio\queues.py”, line 161, in get
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 1223, in _call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 672, in call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 461, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <coroutine object TqSim._run at 0x000000001229A9C8>
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\sim.py”, line 140, in _run
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\sim.py”, line 184, in _send_stat_report
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\channel.py”, line 49, in send
File “C:\ProgramData\Anaconda3\lib\asyncio\queues.py”, line 136, in put
File “C:\ProgramData\Anaconda3\lib\asyncio\queues.py”, line 148, in put_nowait
File “C:\ProgramData\Anaconda3\lib\asyncio\queues.py”, line 66, in _wakeup_next
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 1223, in _call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 672, in call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 461, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <coroutine object TqWebHelper._run at 0x000000001229A548>
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\tqwebhelper.py”, line 145, in _run
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\api.py”, line 1223, in _call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 672, in call_soon
File “C:\ProgramData\Anaconda3\lib\asyncio\base_events.py”, line 461, in _check_closed
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task cancelling coro=<TqWebHelper._data_handler() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\tqwebhelper.py:154> wait_for=<Future finished result=None>>
Task was destroyed but it is pending!
task: <Task pending coro=<TqWebHelper.link_httpserver() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\tqwebhelper.py:307> wait_for=<Future cancelled>>
Exception ignored in: <coroutine object TqWebHelper.link_httpserver at 0x00000000176BA748>
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\tqwebhelper.py”, line 310, in link_httpserver
File “C:\ProgramData\Anaconda3\lib\site-packages\aiohttp\web_runner.py”, line 239, in cleanup
File “C:\ProgramData\Anaconda3\lib\asyncio\events.py”, line 726, in get_event_loop_policy
File “C:\ProgramData\Anaconda3\lib\asyncio\events.py”, line 719, in _init_event_loop_policy
ImportError: sys.meta_path is None, Python is likely shutting down
Task was destroyed but it is pending!
task: <Task pending coro=<TqSim._md_handler() running at C:\ProgramData\Anaconda3\lib\site-packages\tqsdk\sim.py:149> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x00000000125049D8>()]>>
Exception ignored in: <coroutine object TqSim._md_handler at 0x00000000176BA4C8>