GraiaProject / Ariadne

一个优雅且完备的 Python QQ 自动化框架,基于 Mirai API HTTP v2。 Powered by Graia Project.
https://graia.cn/ariadne
GNU Affero General Public License v3.0
751 stars 45 forks source link

ImportError: cannot import name 'adapter_ctx' from 'graia.ariadne.context' #189

Closed bakaEC closed 2 years ago

bakaEC commented 2 years ago

问题

小弟不才,移植了个人写的项目之后发现adapter_ctx的Import error,重装MCL和graia-ariadne都试过了,还是如此。

使用环境:

日志 PS C:\Users\Administrator\Desktop\bot> python .\main.py Traceback (most recent call last): File "C:\Users\Administrator\Desktop\bot\main.py", line 8, in from graia.ariadne.context import adapter_ctx ImportError: cannot import name 'adapter_ctx' from 'graia.ariadne.context' (C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\graia\ariadne\context.py)

BlueGlassBlock commented 2 years ago

0.7 没有 adapter_ctx 了,可以说一下你的用途

bakaEC commented 2 years ago

问题已解决,之前用于获取session,现在跟着文档已经OK了😆