‘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.
相关推荐
c骑着乌龟追兔子3 分钟前
Day 42 复习日
python
Robot侠6 分钟前
视觉语言导航从入门到精通(二)
开发语言·人工智能·python·llm·vln
无限大.11 分钟前
为什么玩游戏需要独立显卡?——GPU与CPU的分工协作
python·玩游戏
deephub12 分钟前
llama.cpp Server 引入路由模式:多模型热切换与进程隔离机制详解
人工智能·python·深度学习·llama
简单点好不好17 分钟前
2025--简单点--python之状态模式
开发语言·python·状态模式
棒棒的皮皮29 分钟前
【OpenCV】Python图像处理之仿射变换
图像处理·python·opencv·计算机视觉
weixin_4462608538 分钟前
FastF1: 轻松获取和分析F1数据的Python包
开发语言·python
我送炭你添花39 分钟前
Pelco KBD300A 模拟器:06.用 PyQt5 实现 1:1 像素级完美复刻 Pelco KBD300A 键盘
python·qt·自动化·运维开发
山土成旧客41 分钟前
【Python学习打卡-Day22】启航Kaggle:从路径管理到独立项目研究的全方位指南
开发语言·python·学习
我命由我1234543 分钟前
Python Flask 开发 - Flask 路径参数类型(string、int、float、path、uuid)
服务器·开发语言·后端·python·flask·学习方法·python3.11