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

AttributeError: type object 'Callable' has no attribute '_abc_registry' #131

Closed
gt299792 opened this issue May 3, 2019 · 9 comments
Closed

Comments

@gt299792
Copy link

gt299792 commented May 3, 2019

  • Version: 1.3.0

  • Python: 3.7

  • OS: osx/linux/win

  • result of pip freeze | grep eth

eth-abi==1.3.0
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.0b3
eth-rlp==0.1.2
eth-typing==2.1.0
eth-utils==1.5.2
prometheus-client==0.3.1
pyethereum==1.0.0

What was wrong?

Please include any of the following that are applicable:

  • The code which produced the error
import eth_abi
  • The full output of the error
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python37\Lib\site-packages\eth_abi\__init__.py", line 3, in <module>
    from eth_abi.abi import (  # NOQA
  File "C:\Python37\Lib\site-packages\eth_abi\abi.py", line 4, in <module>
    from eth_utils import (
  File "C:\Python37\Lib\site-packages\eth_utils\__init__.py", line 5, in <module>
    from .abi import (  # noqa: F401
  File "C:\Python37\Lib\site-packages\eth_utils\abi.py", line 1, in <module>
    from typing import Any, Dict
  File "C:\Python37\Lib\site-packages\typing.py", line 1356, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "C:\Python37\Lib\site-packages\typing.py", line 1004, in __new__
    self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'

How can it be fixed?

Fill this section in if you know how this could or should be fixed.

@gt299792
Copy link
Author

gt299792 commented May 3, 2019

I solved this problem with pip uninstall typing

@carver
Copy link
Collaborator

carver commented May 3, 2019

Yup, we only test against the built-in typing library. Closing as not a bug. Thanks for the report and the follow-up!

@jordanmkoncz
Copy link

When using Pip version 20.1 (released 29/04/2020), the solution of uninstalling the typing package no longer works for some reason. An easy workaround is to ensure you're using the previous version of Pip, 20.0.2, where this solution still works.

@hs-ye
Copy link

hs-ye commented May 25, 2020

PSA: So it turns out that the extra typing package is redundant after py 3.6 and is only used to backport this functionality in earlier versions. https://pypi.org/project/typing/

Can safely uninstall this if you are using any later versions of python.

@carver
Copy link
Collaborator

carver commented May 26, 2020

When using Pip version 20.1 (released 29/04/2020), the solution of uninstalling the typing package no longer works for some reason. An easy workaround is to ensure you're using the previous version of Pip, 20.0.2, where this solution still works.

Hm, yeah, I've notice a couple bugs in recent versions of pip. An upgrade to latest pip/setuptools, plus wiping away and re-building a venv did the trick. So that's another thing to try, especially in this case, if you have a typing uninstall that isn't helping.

@moriyoshi
Copy link

pypa/pip#8272

@Arindam-Jain
Copy link

I solved this problem with pip uninstall typing

God bless you thanks very much

@jayanti-prasad
Copy link

I solved this problem with pip uninstall typing

yes it works !

@ethereum ethereum locked as resolved and limited conversation to collaborators Aug 25, 2020
@carver
Copy link
Collaborator

carver commented Aug 25, 2020

Glad that people were finding the tips in this issue as helpful. The "thanks" comments ping us, so I'm locking the thread for now. Feel free to pile onto the emojis for the helpful comment to give your thanks. :)

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

No branches or pull requests

7 participants