实在想不明白C:\Users\misaka\AppData\Local\Programs\Python\Python311\python.exe C:\Users\misaka\PycharmProjects\pythonProject\爬虫\第四章\协程.py
Traceback (most recent call last):
File "C:\Users\misaka\PycharmProjects\pythonProject\爬虫\第四章\协程.py", line 32, in <module>
asyncio.run(asyncio.wait(tasks))
File "C:\Users\misaka\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\misaka\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\misaka\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\misaka\AppData\Local\Programs\Python\Python311\Lib\asyncio\tasks.py", line 415, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
sys:1: RuntimeWarning: coroutine 'func1' was never awaited
sys:1: RuntimeWarning: coroutine 'func2' was never awaited
sys:1: RuntimeWarning: coroutine 'func3' was never awaited
|