Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

AttributeError: module 'googleapiclient' has no attribute '__version__' #15

Closed
edufresne opened this issue Apr 21, 2020 · 4 comments
Closed

Comments

@edufresne
Copy link

edufresne commented Apr 21, 2020

I am currently running app engine python3:7 environment and am getting errors in all requests going through my app. It fails on the import line to the googleclouddebugger library

try:
    import googleclouddebugger

    googleclouddebugger.enable()
except ImportError:
    pass

requirements.txt

google-python-cloud-debugger

Stacktrace:

AttributeError: module 'googleapiclient' has no attribute '__version__'
at <module> (/env/lib/python3.7/site-packages/apiclient/__init__.py:22)
at <module> (/env/lib/python3.7/site-packages/googleclouddebugger/gcp_hub_client.py:33)
at <module> (/env/lib/python3.7/site-packages/googleclouddebugger/__init__.py:33)
at <module> (/srv/main.py:26)
@mctavish
Copy link
Contributor

It looks like this is caused by googleapis/google-api-python-client#876

@edufresne
Copy link
Author

It looks like this is caused by googleapis/google-api-python-client#876

Manually added google-api-python-client==1.8.0 to requirements.txt fixes the issue. I'll create a PR for pinning the google-api-python-client dependency version to 1.8.0

@busunkim96
Copy link

Hi! Dropping by since I saw you referenced googleapis/google-api-python-client#876.

google-api-python-client 1.8.2 has been released and removes the problematic googleapiclient.__version__ line. In addition, if you have any references to apiclient we recommend you replace them with googleapiclient instead.

@mctavish
Copy link
Contributor

I'm closing this issue because google-api-python-client 1.8.2 fixes the problem.

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

3 participants