调用模块的过程中存在asynchronous comprehension outside async function
的问题
#19
Labels
bug
Something isn't working
8000
asynchronous comprehension outside async function
的问题
#19
环境信息
Python 版本: 3.10.18
操作系统: Linux
调用环境: 在HoshinoBot (基于 NoneBot 的 QQ 机器人框架)的插件中作为模块调用
问题文件: maimai_py/providers/local/__init__.py
问题描述
在插件代码文件中导入 maimai_py 模块后运行bot时,遇到以下错误:
错误发生在 LocalProvider.get_areas 方法中,具体是在尝试在列表推导式中使用 await 调用:
可能的原因
试着让ai分析了一下,得到的回答如下:
ai给出的解决方案是把返回值的列表推导式改为显式的异步循环,我按照ai给出的方案修改了包代码确实可以正常运行了
The text was updated successfully, but these errors were encountered: