480 浏览
0

raceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-2′ coro=<TqApi._notify_watcher() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\api.py:3698> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-2′ coro=<TqApi._notify_watcher() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\api.py:3698> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-3′ coro=<TqConnect._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\connect.py:110> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-3′ coro=<TqConnect._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\connect.py:110> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-4′ coro=<TqReconnect._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\connect.py:270> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-4′ coro=<TqReconnect._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\connect.py:270> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-5′ coro=<TqSymbols._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\symbols.py:15> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-5′ coro=<TqSymbols._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\symbols.py:15> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-6′ coro=<TqTradingStatus._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\trading_status.py:16> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-6′ coro=<TqTradingStatus._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\trading_status.py:16> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-7′ coro=<BaseSim._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\tradeable\sim\basesim.py:61> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-7′ coro=<BaseSim._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\tradeable\sim\basesim.py:61> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-8′ coro=<TqWebHelper._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\tqwebhelper.py:74> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-8′ coro=<TqWebHelper._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\tqwebhelper.py:74> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-9′ coro=<DataExtension._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\data_extension.py:74> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-9′ coro=<DataExtension._run() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\data_extension.py:74> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable
Exception in callback <Task pending name=’Task-10′ coro=<TqApi._fetch_msg() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\api.py:3715> cb=[TqBaseApi._on_task_done()]>()
handle: <Handle <Task pending name=’Task-10′ coro=<TqApi._fetch_msg() running at D:\wdStock\.venv\Lib\site-packages\tqsdk\api.py:3715> cb=[TqBaseApi._on_task_done()]>()>
Traceback (most recent call last):
File “D:\Python3.12\Lib\asyncio\events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
TypeError: ‘Task’ object is not callable

李思恒 已回答的问题 2024年7月26日
0

看不出来问题通过这个异常报错,如果你是初始化找不到库,可以尝试在pycharm里安装,就可以避免路径问题

李思恒 已回答的问题 2024年7月26日