‘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.
相关推荐
weixin_408717773 分钟前
Go语言怎么编译Linux程序_Go语言编译Linux可执行文件教程【避坑】
jvm·数据库·python
2501_9449347328 分钟前
财务岗位如何在工作中提升数据分析能力?从财务分析到经营分析这样练
python·信息可视化·数据分析
2401_8654396335 分钟前
CSS怎么在flex布局中实现项目均分间距_设置justify-content space-evenly
jvm·数据库·python
m0_4939345335 分钟前
CSS如何实现输入框禁用样式_使用-disabled伪类设定
jvm·数据库·python
m0_7164300743 分钟前
如何用 classList.toggle 实现侧边栏菜单的点击展开与收起
jvm·数据库·python
Destiny_where1 小时前
Langgraph基础(4)-中断interrupt.实现图执行的动态暂停与外部交互
人工智能·python·langchain·langgraph
好家伙VCC1 小时前
# 发散创新:用 Rust实现高性能物理引擎的底层架构设计与实战在游戏开发、虚拟仿真和机器人控
java·开发语言·python·rust·机器人
石榴树下的七彩鱼1 小时前
图片去水印 API 哪个好?5种方案实测对比(附避坑指南 + 免费在线体验)
图像处理·人工智能·后端·python·api接口·图片去水印·电商自动化
liliangcsdn1 小时前
多轮对话长上下文-向量检索和混合召回示例
开发语言·数据库·人工智能·python
leoZ2311 小时前
金仓老旧项目改造-10
开发语言·前端·人工智能·python·金仓