‘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.
相关推荐
xxxxxmy3 分钟前
相向双指针—三数之和
python·算法·相向双指针
Blossom.1184 分钟前
基于知识图谱+LLM的工业设备故障诊断:从SQL日志到可解释推理的实战闭环
人工智能·python·sql·深度学习·算法·transformer·知识图谱
c***421012 分钟前
python的sql解析库-sqlparse
数据库·python·sql
Q一件事22 分钟前
arcpy选择特定区域进行分析
python
天下·第二26 分钟前
python处理【orc】下载压缩的.zip文件,windows和linux同时适配
linux·windows·python
笨笨没好名字44 分钟前
AI4CAD:用python+creo实现批量参数建模(creo二次开发示例)
数据库·python·microsoft
Python×CATIA工业智造1 小时前
Python多进程爬虫实战:豆瓣读书数据采集与法律合规指南
开发语言·爬虫·python
java1234_小锋1 小时前
基于Python深度学习的车辆车牌识别系统(PyTorch2卷积神经网络CNN+OpenCV4实现)视频教程 - 集成到web系统-识别历史记录实现
python·深度学习·cnn·车牌识别
美团测试工程师1 小时前
软件测试面试题2025年末总结
开发语言·python·测试工具
B站计算机毕业设计之家1 小时前
Python+Flask 电商数据分析系统(Selenium爬虫+多元线性回归)商品数据采集分析可视化系统 实时监控 淘宝数据采集 大屏可视化 (附源码)✅
大数据·爬虫·python·selenium·机器学习·flask·线性回归