‘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.
相关推荐
思绪无限8 分钟前
YOLOv5至YOLOv12升级:快递包裹检测系统的设计与实现(完整代码+界面+数据集项目)
人工智能·python·深度学习·目标检测·计算机视觉·快递包裹检测
千寻girling21 分钟前
机器学习 | 逻辑回归 | 尚硅谷学习
java·人工智能·python·学习·算法·机器学习·逻辑回归
永远不会的CC35 分钟前
研0上岸找实习面试经历
python·算法·面试
l1t38 分钟前
duckdb excel插件和rusty_sheet插件在python中的不同表现
开发语言·python·excel
pele1 小时前
如何解决多线图中线条颜色不渲染(仅标记和提示框显示颜色)的问题
jvm·数据库·python
forEverPlume1 小时前
golang如何排查大量goroutine性能问题_golang大量goroutine性能排查详解
jvm·数据库·python
2301_814809861 小时前
踩坑实战pywebview:用 Python + Web 技术打造轻量级桌面应用
开发语言·前端·python
2401_883600251 小时前
Golang怎么CGO交叉编译_Golang如何在交叉编译时处理CGO依赖问题【避坑】
jvm·数据库·python
smj2302_796826521 小时前
解决leetcode第3906题统计网格路径中好整数的数目
python·算法·leetcode