tracebacks on connect from discovery_cache - "ModuleNotFoundError: No module named 'google'" on 18.04/bionic

Bug #1774659 reported by Gareth Woolridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-googleapi (Ubuntu)
New
Undecided
Unassigned

Bug Description

With python3-googleapi 1.5.5-1 installed on ubuntu 18.04 bionic system we get several tracebacks on connect/discovery related to discovery_cache and module load:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect
    from google.appengine.api import memcache
ModuleNotFoundError: No module named 'google'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module>
    from oauth2client.contrib.locked_file import LockedFile
ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module>
    from oauth2client.locked_file import LockedFile
ModuleNotFoundError: No module named 'oauth2client.locked_file'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect
    from . import file_cache
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in <module>
    'file_cache is unavailable when using oauth2client >= 4.0.0')
ImportError: file_cache is unavailable when using oauth2client >= 4.0.0

On bionic exhibiting the above behavior the versions of the api client and oauth2 libs are:

log-archive@juju-bb6a75-log-archive-bionic-0:~$ dpkg -l | grep google
ii python3-googleapi 1.5.5-1 all Google APIs Client Library - Python 3.x

log-archive@juju-bb6a75-log-archive-bionic-0:~$ dpkg -l | grep oauth
ii python3-oauth2client 4.1.2-3 all OAuth 2.0 client library - Python 3.x
ii python3-oauthlib 2.0.6-1 all generic, spec-compliant implementation of OAuth for Python3

This does not occur on a 16.04/xenial system running python3-googleapi version 1.4.2-1ubuntu1.1

It also does not occur on artful which is also 1.5.5-1 but with earlier oauth2client:

log-archive@juju-bb823a-log-archive-artful-0:~$ dpkg -l | grep google
ii python3-googleapi 1.5.5-1 all Google APIs Client Library - Python 3.x
log-archive@juju-bb823a-log-archive-artful-0:~$ dpkg -l | grep oauth
ii python3-oauth2client 3.0.0-1 all OAuth 2.0 client library - Python 3.x
ii python3-oauthlib 2.0.1-1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.