‘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.
相关推荐
天天进步201512 小时前
Python全栈实战:基于机器学习的用户行为分析系统
python
linzeyang12 小时前
Advent of Code 2025 挑战全手写代码 Day 5 - 餐厅
后端·python
祝余Eleanor13 小时前
Day 29 类的定义及参数
人工智能·python·机器学习
码界奇点13 小时前
基于Dash+FastAPI的通用中后台管理系统设计与实现
python·车载系统·毕业设计·fastapi·源代码管理·dash
white-persist13 小时前
【攻防世界】reverse | Mysterious 详细题解 WP
c语言·开发语言·网络·汇编·c++·python·安全
小oo呆13 小时前
【学习心得】Python好库推荐——pipx
linux·开发语言·python
smile_Iris13 小时前
Day 28 元组和OS模块
python·机器学习
AI科技星14 小时前
时空运动的几何约束:张祥前统一场论中圆柱螺旋运动光速不变性的严格数学证明与物理诠释
服务器·数据结构·人工智能·python·科技·算法·生活
AIsdhuang14 小时前
2025 AI培训权威榜:深度评测与趋势前瞻
人工智能·python·物联网
m0_7269659814 小时前
RAG小实战
开发语言·python