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

ImportError: cannot import name 'collections_abc' #604

Closed
aarontp opened this issue Oct 15, 2020 · 1 comment · Fixed by #606
Closed

ImportError: cannot import name 'collections_abc' #604

aarontp opened this issue Oct 15, 2020 · 1 comment · Fixed by #606

Comments

@aarontp
Copy link
Member

aarontp commented Oct 15, 2020

Tests are currently failing because of some library version issues:

======================================================================
ERROR: Failure: ImportError (cannot import name 'collections_abc')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/imp.py", line 245, in load_module
    return load_package(name, filename)
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/imp.py", line 217, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/travis/build/google/turbinia/turbinia/workers/__init__.py", line 40, in <module>
    from turbinia import state_manager
  File "/home/travis/build/google/turbinia/turbinia/state_manager.py", line 37, in <module>
    from google.cloud import datastore
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/google/cloud/datastore/__init__.py", line 60, in <module>
    from google.cloud.datastore.client import Client
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 26, in <module>
    from google.cloud.datastore._http import HTTPDatastoreAPI
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/google/cloud/datastore/_http.py", line 19, in <module>
    from google.cloud import _http as connection_module
  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/google/cloud/_http.py", line 22, in <module>
    from six.moves import collections_abc
ImportError: cannot import name 'collections_abc'

Looks like we have an old version, and other people have solved this by upgrading (googleapis/google-cloud-python#9965).

ERROR: google-api-core 1.22.4 has requirement six>=1.13.0, but you'll have six 1.11.0 which is incompatible.
ERROR: google-api-python-client 1.12.3 has requirement six<2dev,>=1.13.0, but you'll have six 1.11.0 which is incompatible.
@aarontp
Copy link
Member Author

aarontp commented Oct 16, 2020

A fresh install doesn't seem to have these issues, and while there are a lot of dependencies on six, I don't see anything conflicting in the pipdeptree output:

$ pipdeptree | grep six | sort | uniq -c | sort -rn
     16           - six [required: >=1.9, installed: 1.15.0]
     10         - six [required: >=1.9, installed: 1.15.0]
     10             - six [required: >=1.9, installed: 1.15.0]
     10         - six [required: >=1.9.0, installed: 1.15.0]
      8           - six [required: >=1.9.0, installed: 1.15.0]
      7           - six [required: Any, installed: 1.15.0]
      7       - six [required: >=1.13.0, installed: 1.15.0]
      7         - six [required: >=1.13.0, installed: 1.15.0]
      6         - six [required: Any, installed: 1.15.0]
      5             - six [required: >=1.5, installed: 1.15.0]
      4       - six [required: Any, installed: 1.15.0]
      4             - six [required: Any, installed: 1.15.0]
      4       - six [required: >=1.9.0, installed: 1.15.0]
      4             - six [required: >=1.4.1, installed: 1.15.0]
      3         - six [required: >=1.4.1, installed: 1.15.0]
      2               - six [required: >=1.9, installed: 1.15.0]
      2             - six [required: >=1.9.0, installed: 1.15.0]
      2       - six [required: >=1.6, installed: 1.15.0]
      2         - six [required: >=1.6, installed: 1.15.0]
      2           - six [required: >=1.5, installed: 1.15.0]
      2           - six [required: >=1.13.0, installed: 1.15.0]
      1   - six [required: Any, installed: 1.15.0]
      1       - six [required: >=1.9, installed: 1.15.0]
      1     - six [required: >=1.9.0, installed: 1.15.0]
      1           - six [required: >=1.6, installed: 1.15.0]
      1         - six [required: >=1.5, installed: 1.15.0]
      1   - six [required: >=1.5.2, installed: 1.15.0]
      1         - six [required: >=1.5.2, installed: 1.15.0]
      1           - six [required: >=1.5.2, installed: 1.15.0]
      1     - six [required: >=1.4.1, installed: 1.15.0]
      1           - six [required: >=1.4.1, installed: 1.15.0]
      1     - six [required: >=1.4.0, installed: 1.15.0]
      1     - six [required: >=1.13.0, installed: 1.15.0]
      1     - six [required: >=1.13.0,<2dev, installed: 1.15.0]
      1       - six [required: >=1.13.0,<2dev, installed: 1.15.0]

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

Successfully merging a pull request may close this issue.

1 participant