‘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.
相关推荐
Absurd58728 分钟前
JavaScript中模块化在游戏引擎开发中的资源调度作用
jvm·数据库·python
2301_815279521 小时前
SQL如何利用聚合函数生成业务分析指标_KPI计算基础教程
jvm·数据库·python
qq_330037991 小时前
mysql如何排查Out of memory错误_mysql内存分配调优
jvm·数据库·python
好家伙VCC1 小时前
**发散创新:用Rust实现基于RAFT共识算法的轻量级分布式日志系统**在分布式系统中,**一致性协议**是保障数据可靠
java·分布式·python·rust·共识算法
weixin_458580122 小时前
如何在 Go 中直接将 AST 编译为可执行二进制文件?
jvm·数据库·python
2301_816660218 小时前
PHP怎么处理Eloquent Attribute Inference属性推断_Laravel从数据自动推导类型【操作】
jvm·数据库·python
第一程序员8 小时前
数据工程 pipelines 实践
python·github
知行合一。。。8 小时前
Python--05--面向对象(属性,方法)
android·开发语言·python
郝学胜-神的一滴8 小时前
深度学习必学:PyTorch 神经网络参数初始化全攻略(原理 + 代码 + 选择指南)
人工智能·pytorch·python·深度学习·神经网络·机器学习
qq_372154239 小时前
Go 中自定义类型与基础类型的显式转换规则详解
jvm·数据库·python