Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'Protocol' #150

Closed
zhu2014yi opened this issue Jul 16, 2021 · 2 comments
Closed

cannot import name 'Protocol' #150

zhu2014yi opened this issue Jul 16, 2021 · 2 comments

Comments

@zhu2014yi
Copy link

你好,我遇到了如标题的问题,我的库版本是如下,请问我应该如何解决!
Traceback (most recent call last):
File "F:/Python_proj/Robot_transfer_msg/QQMsgTransfer/testRobot.py", line 1, in
from graia.broadcast import Broadcast
File "D:\ProgramData\Anaconda3\envs\robot\lib\site-packages\graia\broadcast_init_.py", line 8, in
from .builtin.event import ExceptionThrowed
File "D:\ProgramData\Anaconda3\envs\robot\lib\site-packages\graia\broadcast\builtin\event.py", line 4, in
from ..entities.event import Dispatchable
File "D:\ProgramData\Anaconda3\envs\robot\lib\site-packages\graia\broadcast\entities\event.py", line 2, in
from typing import TYPE_CHECKING, Any, Protocol, Tuple, TypeVar, Union
ImportError: cannot import name 'Protocol'
image

@zhu2014yi
Copy link
Author

下面是我的库的版本
packages in environment at D:\ProgramData\Anaconda3\envs\robot:
Name Version Build Channel
aiohttp 3.7.4.post0 pypi_0 pypi
async-timeout 3.0.1 pypi_0 pypi
attrs 21.2.0 pypi_0 pypi
certifi 2021.5.30 py36haa95532_0
chardet 4.0.0 pypi_0 pypi
charset-normalizer 2.0.2 pypi_0 pypi
contextvars 2.4 pypi_0 pypi
dataclasses 0.8 pypi_0 pypi
graia-application-mirai 0.20.1 pypi_0 pypi
graia-broadcast 0.11.3 pypi_0 pypi
idna 3.2 pypi_0 pypi
idna-ssl 1.1.0 pypi_0 pypi
immutables 0.15 pypi_0 pypi
multidict 5.1.0 pypi_0 pypi
pip 21.1.3 py36haa95532_0
pydantic 1.8.2 pypi_0 pypi
python 3.6.13 h3758d61_0
regex 2020.11.13 pypi_0 pypi
requests 2.26.0 pypi_0 pypi
setuptools 52.0.0 py36haa95532_0
sqlite 3.36.0 h2bbff1b_0
typing-extensions 3.10.0.0 pypi_0 pypi
urllib3 1.26.6 pypi_0 pypi
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.36.2 pyhd3eb1b0_0
wincertstore 0.2 py36h7fe50ca_0
yarl 1.6.3 pypi_0 pypi

@zhu2014yi
Copy link
Author

已解决,版本不匹配,退回graia-application-maria==0.19版本就OK了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant