‘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.
相关推荐
tang&1 小时前
【Python自动化测试】Selenium常用函数详解
开发语言·python·selenium
路边草随风6 小时前
milvus向量数据库使用尝试
人工智能·python·milvus
newobut7 小时前
vscode远程调试python程序,基于debugpy库
vscode·python·调试·debugpy
APIshop7 小时前
用 Python 把“API 接口”当数据源——从找口子到落库的全流程实战
开发语言·python
一点晖光8 小时前
Docker 作图咒语生成器搭建指南
python·docker
smj2302_796826528 小时前
解决leetcode第3768题.固定长度子数组中的最小逆序对数目
python·算法·leetcode
木头左8 小时前
位置编码增强法在量化交易策略中的应用基于短期记忆敏感度提升
python
Acc1oFl4g8 小时前
详解Java反射
java·开发语言·python
ney1878190247410 小时前
分类网络LeNet + FashionMNIST 准确率92.9%
python·深度学习·分类
Data_agent10 小时前
1688获得1688店铺列表API,python请求示例
开发语言·python·算法