‘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.
相关推荐
2401_8716965219 小时前
CSS如何优化移动端CSS选择器性能_遵循BEM规范避免过长嵌套
jvm·数据库·python
invicinble19 小时前
java集合的设计思路
java·开发语言·python
源码之家19 小时前
计算机毕业设计:Python股票交易管理可视化系统 Django框架 requests爬虫 数据分析 可视化 大数据 大模型(建议收藏)✅
爬虫·python·深度学习·信息可视化·数据分析·django·课程设计
SunnyDays101119 小时前
使用 Python 高效提取 Word 文档的特定页 (连续页、不连续页、按页拆分)
python·提取 word 文档页面·拆分 word 文档
2401_8836002519 小时前
Cgo 回调中处理 const char- 参数的正确方法
jvm·数据库·python
gmaajt19 小时前
CSS 背景图片无法加载的常见原因与正确写法详解
jvm·数据库·python
宇宙realman_99919 小时前
DSP28335-FlashAPI使用
linux·前端·python
解救女汉子19 小时前
Python如何计算NumPy数组的协方差矩阵_调用cov函数进行特征分析
jvm·数据库·python
2201_7610405920 小时前
Golang怎么安全关闭channel_Golang channel关闭教程【通俗】
jvm·数据库·python
m0_4939345320 小时前
Redis怎样合并多天访客数据_通过PFMERGE指令聚合HyperLogLog记录
jvm·数据库·python