‘ProactorEventLoop‘ object has no attribute ‘_compute_internal_coro‘

问题

windows开发环境Pycharm通过loop.run_until_complete执行asyncio异步多线程时突然出现报错:

"AttributeError: 'ProactorEventLoop' object has no attribute '_compute_internal_coro'"

最开始怀疑时Python版本问题或者环境配置问题,排查了很久都没有解决问题。

解决步骤

在Google发现了是Pycharm升级到2023.3后导致的,只能回退版本或修改配置

  • 在Pycharm使用快捷键 CTRL+Shift+A
  • 输入 "Registry..."
  • 修改 python.debug.asyncio.repl 取消勾选
  • 重启

官方社区

To enable asyncio for the debugger, follow the steps:

  1. Open PyCharm
  2. Use Shift + Shift (Search Everywhere)
  3. In the popup type: and press Enter Registry
  4. Find "Registry" in the list of results and click on it.
  5. In the new popup find line and check the respective checkboxpython.debug.asyncio.repl
  6. Press Close.
  7. Restart the IDE.
  8. The asyncio support will be enabled in the debugger.
相关推荐
我是菜鸟0713号1 天前
Qt + Python 算法集成的一种低耦合实践:FastAPI 服务化方案
python·qt·fastapi
我是一只小青蛙8881 天前
TraeCNIDE Python开发全流程指南
python
欣然~1 天前
法律案例 PDF 批量转 TXT 工具代码
linux·前端·python
季布,1 天前
本地Windows测试:钉钉群消息/文件传输到Python服务(完整教程)
windows·python·钉钉
zm-v-159304339861 天前
最新AI-Python自然科学领域机器学习与深度学习技术
人工智能·python·机器学习
qwerasda1238521 天前
Mask-RCNN右转交通标志识别训练与优化
python
郝学胜-神的一滴1 天前
何友院士《人工智能发展前沿》全景解读:从理论基石到产业变革
人工智能·python·深度学习·算法·机器学习
划水的code搬运工小李1 天前
自制py功能包解析IMU航迹推算
python·imu·航迹推算
玖疯子1 天前
TCP/IP协议栈深度解析技术文章大纲
python·scikit-learn·pyqt·pygame
sunfove1 天前
Python 自动化实战:从识图点击、模拟真人轨迹到封装 EXE 全流程教学
开发语言·python·自动化