Skip to content

googleapiclient.discovery.build fails with module 'six.moves' has no attribute 'collections_abc' since version 1.12.0 #1029

Closed

Description

@jqll

Environment details

  • OS type and version: 18.04.1-Ubuntu
  • Python version: Python 3.6.9
  • pip version: pip --version pip 9.0.1
  • google-api-python-client version: pip show google-api-python-client: Version: 1.12.0

Code example

googleapiclient.discovery.build() fails with message: module 'six.moves' has no attribute 'collections_abc'

We only see this problem with google-api-python-client 1.12.0. 1.11.0 is fine.

Activity

  1. tomthorogood commented on Sep 14, 2020

    @tomthorogood

    This affects my team also, and now all of our Travis builds are failing.

    NB: pinning our dependencies to 1.11.0 for now.

  2. kalyanac commented on Sep 14, 2020

    @kalyanac

    Our (Cloud Profiler team) probers failed, which is how we stumbled up on this. I am also curious why this was not caught in unit tests before it got merged and released.

  3. busunkim96 commented on Sep 14, 2020

    @busunkim96
    Contributor

    Hi @jqll,

    Thanks for filing an issue. It looks like this is a result of not advancing the lower bound on six. collections_abc is only available in six>=1.13.0. See six's changelog.

    install_requires = [
    # NOTE: Apache Beam tests depend on this library and cannot
    # currently upgrade their httplib2 version.
    # Please see https://github.com/googleapis/google-api-python-client/pull/841
    "httplib2>=0.9.2,<1dev",
    "google-auth>=1.16.0",
    "google-auth-httplib2>=0.0.3",
    "google-api-core>=1.21.0,<2dev",
    "six>=1.13.0,<2dev",
    "uritemplate>=3.0.0,<4dev",
    ]

    @kalyanac At the moment tests always install the latest version of dependencies. We're going to move to having explicit requirements.txt for tests runs so we catch lower bound issues like this automatically in the future.

    For now, you can use 1.11.0 or upgrade six. A new release 1.12.1 should be released later today with the adjusted pin on six.

  4. kalyanac commented on Sep 14, 2020

    @kalyanac

    Thank you for the detailed response and the quick action.

  5. jqll commented on Sep 14, 2020

    @jqll
    Author

    Thanks for the quick fix!

  6. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Sep 15, 2020
  7. self-assigned this
    on Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions