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

type object 'Callable' has no attribute '_abc_registry' #139

Closed
simkessy opened this issue May 21, 2020 · 3 comments
Closed

type object 'Callable' has no attribute '_abc_registry' #139

simkessy opened this issue May 21, 2020 · 3 comments

Comments

@simkessy
Copy link

I'm getting this error

   Downloading https://artifacts-prod-use1.site.com/artifactory/api/pypi/pypi-python-pip-prod-remote/packages/fa/63/d915cb69188474cbf241edbabe03b80aec531a6dfbc05d9db11dcd71ee55/xmlsec-1.3.7.tar.gz (59 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-h32moud9/overlay --no-warn-script-location --no-binary greenlet,pinterest-pintrace,pintrace --only-binary :none: -i https://artifacts-prod-use1.site.com/artifactory/api/pypi/pypi-python-pip-prod-remote/simple/ --extra-index-url https://pypirepo.site.com/ -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4'
       cwd: None
  Complete output (44 lines):
  Traceback (most recent call last):
    File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/usr/local/lib/python3.7/dist-packages/pip/__main__.py", line 26, in <module>
      sys.exit(_main())
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/commands/__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
    File "<frozen importlib._bootstrap>", line 983, in _find_and_load
    File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 728, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/commands/install.py", line 24, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/req_command.py", line 16, in <module>
      from pip._internal.index.package_finder import PackageFinder
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/index/package_finder.py", line 21, in <module>
      from pip._internal.index.collector import parse_links
    File "/usr/local/lib/python3.7/dist-packages/pip/_internal/index/collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/requests/__init__.py", line 114, in <module>
      from . import utils
    File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/requests/utils.py", line 25, in <module>
      from . import certs
    File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/requests/certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
      from .core import contents, where
    File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/certifi/core.py", line 12, in <module>
      from importlib.resources import read_text
    File "/usr/lib/python3.7/importlib/resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "/usr/local/lib/python3.7/dist-packages/typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/usr/local/lib/python3.7/dist-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-h32moud9/overlay --no-warn-script-location --no-binary greenlet,pinterest-pintrace,pintrace --only-binary :none: -i https://artifacts-prod-use1.site.com/artifactory/api/pypi/pypi-python-pip-prod-remote/simple/ --extra-index-url https://pypirepo.site.com/ -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4' Check the logs for full command output.
WARNING: You are using pip version 20.1; however, version 20.1.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
@hoefling
Copy link
Member

The error comes from /usr/local/lib/python3.7/dist-packages/typing.py which is not part of the stdlib. Do you have the typing package intalled? If yes, uninstalling it should be fine as typing is part of the stdlib since 3.5.

@hoefling
Copy link
Member

Also worth noting: https://stackoverflow.com/q/55833509/2650249. Looks like this is not related to xmlsec, thus closing. Ping me if this issue should be reopened, though!

@tony
Copy link

tony commented Jun 21, 2020

Happens on 3.8 also

Looks like its related to pip [1, 2]

pip install -U "pip<20.1"

pip3.7 install -U --user "pip<20.1"

pip3.8 install -U --user "pip<20.1"

Then I had to remove and recreate virtualenv for the project I was on

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

3 participants