‘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.
相关推荐
qq_424098565 分钟前
HTML5中解决数据库版本号管理混乱的规范化建议
jvm·数据库·python
Sherry Wangs8 分钟前
flash-attn安装指南
pytorch·python·flash-attn
Irene199110 分钟前
Python下载第三方库:requests、oracledb,连接 Oracle 数据库,测试数据输出(切记不要操作或删除系统表)
数据库·python·oracledb
weixin_4410036410 分钟前
python编程从入门到实践第三版pdf免费下载
python·pdf
四维迁跃14 分钟前
HTML5中SVG利用Javascript实现图形拖拽与缩放
jvm·数据库·python
深度红薯29 分钟前
SAM3:开放式分割,太强了(后面有SAM3权重下载方式)(单图测试、视频测试、实时跟踪)
图像处理·人工智能·python·深度学习·毕业设计·毕设·sam3
weixin_4249993633 分钟前
html如何修改备注
jvm·数据库·python
214396538 分钟前
HTML怎么创建时间轴布局_HTML结构化时间线写法【方法】
jvm·数据库·python
小草cys38 分钟前
树莓派4b + USRP B210 搭建反无人机(反无)系统( HTML + CDN )
开发语言·python·机器学习
gmaajt38 分钟前
HTML函数开发需要SSD吗_SSD对HTML函数开发效率影响【详解】
jvm·数据库·python