‘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.
相关推荐
baidu_3409988214 小时前
mysql如何导出表结构而不导出数据_mysqldump无数据模式
jvm·数据库·python
Wyz2012102414 小时前
C#怎么判断网络是否掉线_C#如何实现心跳包检测机制【进阶】
jvm·数据库·python
m0_3776182314 小时前
Redis如何利用位图快速判断数据存在性
jvm·数据库·python
Ares-Wang14 小时前
flask》》信号
后端·python·flask
2401_8359568114 小时前
Vue 3 中集成 Three.js 场景的完整实现指南
jvm·数据库·python
Irene199114 小时前
Python 中的全局变量 global 和 globals()
python
weixin_5689960614 小时前
CSS移动端实现卡片悬浮投影_利用box-shadow设置层次感
jvm·数据库·python
Polar__Star14 小时前
Go语言怎么做自动补全_Go语言CLI自动补全教程【经典】
jvm·数据库·python
qq_4240985614 小时前
CSS如何去掉数字输入框的默认微调按钮_利用---webkit-inner-spin-button
jvm·数据库·python
Full Stack Developme14 小时前
Hutool File 教程
linux·windows·python