google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

Breaking change for google-api-python-client 1.8.1 - AttributeError: module 'googleapiclient' has no attribute '__version__'

Open koopmac opened this issue 6 years ago • 4 comments

Environment details

  • Python version: python-3.8.2
  • pip version: pip-9.0.1
  • google-api-python-client version: 1.8.1

Steps to reproduce

Dependencies: Flask==1.1.1 werkzeug==1.0

Application server for both development and production.

gunicorn==19.9.0

Testing and static analysis.

pytest==5.1.0 pytest-cov==2.7.1 mock==3.0.5 flake8==3.7.8

CLI.

Click==6.4

Data and workers.

psycopg2==2.6.1

psycopg2==2.8.4 Flask-SQLAlchemy==2.4.1 SQLAlchemy==1.3.7 redis==3.3.11 celery==4.4.0

Forms.

Flask-WTF==0.14.3 WTForms-Components==0.10.4 WTForms-Alchemy==0.16.9

Utils.

fake-factory==0.5.7

faker==3.0.0

Extensions.

flask-debugtoolbar==0.10.1 Flask-Mail==0.9.1 Flask-Login==0.4.1

Payments.

stripe==2.41.0 gocardless_pro==1.10.0

Google API requirements

google-api-core==1.16.0 google-api-python-client==1.8.0 httplib2 oauth2client google-auth-oauthlib==0.4.1 google-cloud-pubsub==1.4.3

google-auth-httplib2

google-auth

  1. Running docker-compose with docker container python:3.8.1-slim-buster

Stack trace

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker worker.init_process() File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 129, in init_process self.load_wsgi() File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi self.wsgi = self.app.wsgi() File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load return self.load_wsgiapp() File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 350, in import_app import(module) File "/prosebit/prosebit/app.py", line 10, in from prosebit.blueprints.page import page File "/prosebit/prosebit/blueprints/page/init.py", line 1, in from prosebit.blueprints.page.views import page File "/prosebit/prosebit/blueprints/page/views.py", line 4, in from prosebit.blueprints.page.gmail import get_google_auth, ListHistory, add_to_watch, is_meter_data, ListMessagesMatchingQuery, GetMessage, send_message, get_daily_threadid, ModifyMessage, create MsgLabels, get_new_messages File "/prosebit/prosebit/blueprints/page/gmail.py", line 32, in from apiclient import errors File "/usr/local/lib/python3.8/site-packages/apiclient/init.py", line 22, in version = googleapiclient.version AttributeError: module 'googleapiclient' has no attribute 'version'

Thanks!

koopmac avatar Apr 21 '20 00:04 koopmac

I just got this too:

Traceback (most recent call last):
  File "foo.py", line 8, in <module>
    from apiclient.discovery import build
  File "/home/runner/.local/lib/python3.6/site-packages/apiclient/__init__.py", line 22, in <module>
    __version__ = googleapiclient.__version__
AttributeError: module 'googleapiclient' has no attribute '__version__'

Edit: just noticed this is a duplicate of #870

AlexApps99 avatar Apr 21 '20 02:04 AlexApps99

just started this am

import apiclient --

21-Apr-2020 13:12:17 | File "/usr/local/lib/python3.6/dist-packages/apiclient/__init__.py", line 22, in <module>
21-Apr-2020 13:12:17 | __version__ = googleapiclient.__version__
21-Apr-2020 13:12:17 | AttributeError: module 'googleapiclient' has no attribute '__version__'

celsooliveiraTBDE avatar Apr 21 '20 13:04 celsooliveiraTBDE

Closing as this is a duplicate of #870. A fix has been merged and will be released today.

busunkim96 avatar Apr 21 '20 16:04 busunkim96

Fix is in 1.8.2

busunkim96 avatar Apr 21 '20 20:04 busunkim96