‘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.
相关推荐
自信不孤单3 分钟前
UniAda核心代码详解
python·ai·大模型·tta·狄利克雷理论·证据感知
smj2302_7968265214 分钟前
解决leetcode第3883题统计满足数位和数组的非递减数组数目
python·算法·leetcode
李昊哲小课18 分钟前
Python办公自动化教程 - openpyxl让Excel处理变得轻松
python·信息可视化·excel
Ulyanov18 分钟前
Streamlit基础入门与快速原型开发
python·架构·系统仿真
源码之屋34 分钟前
计算机毕业设计:Python出行数据智能分析与预测平台 Django框架 可视化 数据分析 PyEcharts 交通 深度学习(建议收藏)✅
人工智能·python·深度学习·数据分析·django·汽车·课程设计
2301_8035545236 分钟前
三大编程语言(Python/Go/C++)项目启动全解析
c++·python·golang
给自己做减法1 小时前
AI编程相关概念
人工智能·python·ai编程
郝学胜-神的一滴1 小时前
PyTorch自动微分核心解析:从原理到实战实现权重更新
人工智能·pytorch·python·深度学习·算法·机器学习
小龙报1 小时前
【Coze-AI智能体平台】Coze OpenAPI 开发手册:鉴权、接口调用与 SDK 实践
javascript·人工智能·python·深度学习·microsoft·文心一言·开源软件
databook1 小时前
理论都会,实战就废?7个分析模板,帮你打通任督二脉
python·数据挖掘·数据分析