‘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.
相关推荐
Ulyanov几秒前
PyVista与Tkinter桌面级3D可视化应用实战
开发语言·前端·python·3d·信息可视化·tkinter·gui开发
子午11 分钟前
【2026原创】文本情感识别系统~Python+深度学习+textCNN算法+舆情文本+模型训练
python·深度学习·算法
SunnyRivers13 分钟前
uv 与 pip:Python 包与依赖管理工具对比
python·pip·uv
计算机网恋17 分钟前
PyCharm左侧的提交按钮不显示的解决办法
ide·python·pycharm
2501_9413331024 分钟前
【Centernet改进版】基于ResNet50的纱布检测系统实现详解
python
LiuPig刘皮哥34 分钟前
llamaindex 使用火山embedding模型
windows·python·embedding
shughui41 分钟前
Android SDK 下载、安装与配置(详细图文附安装包,适配Appium+Python自动化)
android·python·appium·android-studio·android sdk
天天爱吃肉821841 分钟前
交叉表格与卡方检验:新能源汽车研发测试中的分类变量关联性分析实战
人工智能·python·嵌入式硬件·机器学习·分类·数据挖掘·汽车
山后太阳44 分钟前
如何进行量化类型的实操判断?
python
张彦峰ZYF1 小时前
Java+Python双语言开发AI工具全景分析与选型指南
java·人工智能·python