‘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.
相关推荐
m0_7349497914 分钟前
怎么利用Navicat进行调整备份文件压缩等级_详细配置与操作步骤
jvm·数据库·python
m0_741173331 小时前
如何处理SQL中的NULL值_使用ISNULL或COALESCE函数
jvm·数据库·python
AC赳赳老秦1 小时前
OpenClaw进阶技巧:批量修改文件内容、替换关键词,解放双手
java·linux·人工智能·python·算法·测试用例·openclaw
步辞1 小时前
css伪类选择器-nth-child应用技巧_循环选择列表或表格行的实现方法
jvm·数据库·python
xcbrand2 小时前
快消品品牌策划公司哪家好
大数据·人工智能·python
2301_803875612 小时前
Python怎么计算NumPy数组的切比雪夫距离_使用abs与max求解
jvm·数据库·python
Dxy12393102162 小时前
Python使用XPath定位元素:动态计算与函数调用
开发语言·python
qq_349317483 小时前
CSS如何实现Bootstrap进度条自定义动画_利用keyframe关键帧
jvm·数据库·python
wltx16883 小时前
海外版GEO优化适合耳机出口吗?
人工智能·python
vonlycn3 小时前
PaddleDetection转ONNX 填坑
python·onnx·paddledetection