‘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.
相关推荐
yaoxin52112311 分钟前
324. Java Stream API - 实现 Collector 接口:自定义你的流式收集器
java·windows·python
独行soc18 分钟前
2026年渗透测试面试题总结-24(题目+回答)
网络·python·安全·web安全·渗透测试·安全狮
SmartBrain36 分钟前
Python 特性(第一部分):知识点讲解(含示例)
开发语言·人工智能·python·算法
Lun3866buzha37 分钟前
基于YOLO11-C3k2-FFCM:跳甲虫害叶片智能检测与识别系统
python
Gaosiy1 小时前
技术细节-MNE读取neuroscan curry9版本cdt文件
python·脑机接口·脑电·mne
SmartBrain1 小时前
FastAPI进阶(第一部分):路由和依赖特性(含考题)
开发语言·python
nimadan121 小时前
**手机写小说软件有哪些2025推荐,适配不同创作习惯的实用
python·智能手机
Liue612312311 小时前
基于MS-RCNN和X101-64x4d_FPN的船舶类型识别与检测方法研究
python
Sunsets_Red2 小时前
浅谈随机化与模拟退火
java·c语言·c++·python·算法·c#·信息学竞赛
张3蜂2 小时前
Python pip 命令完全指南:从入门到精通
人工智能·python·pip