‘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.
相关推荐
山峰哥15 小时前
Python爬虫实战:从零构建高效数据采集系统
开发语言·数据库·爬虫·python·性能优化·架构
Jay_Franklin1 天前
SRIM通过python计算dap
开发语言·python
是一个Bug1 天前
Java基础50道经典面试题(四)
java·windows·python
吴佳浩1 天前
Python入门指南(七) - YOLO检测API进阶实战
人工智能·后端·python
liliangcsdn1 天前
python下载并转存http文件链接的示例
开发语言·python
大、男人1 天前
python之Starlette
python·uvicorn
小智RE0-走在路上1 天前
Python学习笔记(11) --数据可视化
笔记·python·学习
历程里程碑1 天前
hot 206
java·开发语言·数据结构·c++·python·算法·排序算法
Coder_Boy_1 天前
Java+Proteus仿真Arduino控制LED问题排查全记录(含交互过程)
java·人工智能·python
qq_356196951 天前
day47_预训练模型与迁移学习@浙大疏锦行
python