‘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.
相关推荐
葱明撅腚2 分钟前
seaborn绘图(下)
python·matplotlib·可视化·seaborn·图表绘制
半路_出家ren6 分钟前
3.python模拟勒索病毒
python·网络安全·密码学·网络攻击模型·base64·病毒·勒索病毒
jhf202024 分钟前
2026汽车4S店GEO优化高性价比公司选型指南:从效果、成本到适配
python·汽车
叫我:松哥28 分钟前
基于scrapy的网易云音乐数据采集与分析设计实现
python·信息可视化·数据分析·beautifulsoup·numpy·pandas
极智-99634 分钟前
GitHub 热榜项目-日榜精选(2026-01-24)| AI智能体工具、Python生态等 | remotion、VibeVoice、goose等
人工智能·python·github·ai智能体·大模型部署·语音ai
YMLT花岗岩1 小时前
Python学习之-函数-入门训练-具有多个返回值的函数
python·学习
北鹤M1 小时前
用MeteoStat计算任意时刻经纬度真实气象数据
人工智能·python
星瞳科技OpenMV1 小时前
星瞳OpenMV官方机械臂教程|从零开始:Robot Arm机械臂快速上手
arm开发·图像处理·python·计算机视觉·ai·机器人·openmv
写代码的【黑咖啡】1 小时前
Python中的lxml:高效XML处理库
xml·开发语言·python
人工智能AI技术1 小时前
【Agent从入门到实践】29 开发第一个Agent——需求定义
人工智能·python