‘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.
相关推荐
natide6 分钟前
表示/嵌入差异-1-欧几里得距离(Euclidean Distance)-L2 距离(L2 distance)-欧式距离的标准化
人工智能·pytorch·python·深度学习·算法·自然语言处理
对方正在长头发丿9 分钟前
Numpy学习篇
python·学习·jupyter·pycharm·numpy
Elaine33614 分钟前
深度实战:基于 Scrapy CrawlSpider 的全自动化教程采集系统
python·scrapy·自动化·网络爬虫
2401_8414956423 分钟前
【游戏开发】登山赛车
数据结构·python·游戏·游戏开发·pygame·登山赛车游戏·游戏打包发布
心无旁骛~31 分钟前
[SO101]在Jetson AGX Thor 上训练和部署GROOT N1.5模型
python·机器人
Heath03334 分钟前
BGE-M3个人理解
python·算法
Hello.Reader43 分钟前
Flink ML Logistic Regression 离线训练 + 在线增量训练(FTRL-Proximal)
python·机器学习·flink
曲幽44 分钟前
Flask项目一键打包实战:用PyInstaller生成独立可执行文件
python·flask·web·pyinstaller·exe·add-data
狮子雨恋1 小时前
Python 多维数组学习示例
python·学习·numpy
easyboot1 小时前
python获取C#WEBAPI的数据
开发语言·python·c#