Google-api-python-client: AttributeError: module 'googleapiclient' has no attribute '__version__'

Created on 21 Apr 2020  路  3Comments  路  Source: googleapis/google-api-python-client

When importing new version of google-api-python-client
from apiclient import discovery
i'm getting the error
AttributeError: module 'googleapiclient' has no attribute '__version__'

https://github.com/googleapis/google-api-python-client/blob/84d45619d753cb04d957651886231034194058b6/apiclient/__init__.py#L22

i guess this happens since you have removed __version__ var from googleapiclient/__init__.py

https://github.com/googleapis/google-api-python-client/commit/f706cfd821ab7457e5db37abfc3619772657dd0e#diff-b926d296d4c856bcbf877809e4523562L15

can you please fix? @busunkim96 @mik-laj @crwilcox

Traceback:
``` from apiclient import discovery
File "/usr/local/lib/python3.7/site-packages/apiclient/__init__.py", line 22, in
__version__ = googleapiclient.__version__
AttributeError: module 'googleapiclient' has no attribute '__version__'

Most helpful comment

Gend mar do google ki bkc

All 3 comments

@davidstrouk Thanks for the report! As an FYI, we generally recommend you import from googleapiclient now. You shouldn't have to make any other changes.

from googleapiclient import discovery

Gend mar do google ki bkc

Was this page helpful?
0 / 5 - 0 ratings