Python module 'asyncio' has no attribute 'get_event_loop'

D:\remote_git\iot_tool\download_tool\concurrent\Scripts\python.exe D:/Python/concurrent/asyncio2.py
Traceback (most recent call last):
  File "D:/Python/concurrent/asyncio2.py", line 1, in 
    import asyncio
  File "D:\Python\concurrent\asyncio.py", line 18, in 
    loop = asyncio.get_event_loop()
AttributeError: module 'asyncio' has no attribute 'get_event_loop'

汗。。。。文件名和库名重复了。。

然后把名字改了之后重新编译

又报错

Python ModuleNotFoundError: No module named 'concurrent.futures'

发现又有一个文件命名为了concurrent.py

赶紧改过了,编译通过。。。

你可能感兴趣的:(Python)