web3-gear
web3-gear copied to clipboard
ImportError: cannot import name 'Protocol' from 'typing' when running web3-gear command
Getting this error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/web3-gear", line 5, in <module>
from gear.cli import run_server
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gear/cli.py", line 8, in <module>
from .rpc import make_version
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gear/rpc.py", line 15, in <module>
from jsonrpcserver import method
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jsonrpcserver/__init__.py", line 19, in <module>
from .async_main import (
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jsonrpcserver/async_main.py", line 5, in <module>
from .async_dispatcher import dispatch_to_response_pure
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jsonrpcserver/async_dispatcher.py", line 9, in <module>
from oslash.either import Left # type: ignore
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/oslash/__init__.py", line 2, in <module>
from .typing import Functor, Applicative, Monoid, Monad
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/oslash/typing/__init__.py", line 2, in <module>
from .applicative import Applicative
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/oslash/typing/applicative.py", line 3, in <module>
from typing import Callable, TypeVar, Protocol
ImportError: cannot import name 'Protocol' from 'typing' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py)
When running the web3-gear command on a Mac
I have the same problem.Have you solved it?