Skip to content

ImportError shows in logs when implementing datastore export sample #4185

Closed

Description

@aawilson

In which file did you encounter the issue?

datastore/schedule-export/main.py

Did you change the file? If so, how?

No

Describe the issue

When implementing a cloud function using schedule-export/main.py, these messages show up in the logs on a run (the function still executes successfully):

2020-06-26T19:34:03.459Z datastore_export file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export Traceback (most recent call last): E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export   File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module> E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export     from oauth2client.contrib.locked_file import LockedFile E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export ModuleNotFoundError: No module named 'oauth2client' E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export  E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export During handling of the above exception, another exception occurred: E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export  E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export Traceback (most recent call last): E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export   File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module> E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export     from oauth2client.locked_file import LockedFile E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export ModuleNotFoundError: No module named 'oauth2client' E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export  E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export During handling of the above exception, another exception occurred: E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export  E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export Traceback (most recent call last): E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export   File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/__init__.py", line 44, in autodetect E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export     from . import file_cache E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export   File "/env/local/lib/python3.7/site-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in <module> E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export     "file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth" E  datastore_export 
2020-06-26T19:34:03.459Z datastore_export ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth E  datastore_export 

The error referred to is mentioned in this issue, which suggests a workaround: googleapis/google-api-python-client#325 (comment)

Activity

  1. aawilson commented on Jun 26, 2020

    @aawilson
    ContributorAuthor
  2. added
    api: datastore
    type: bug
    priority: p1
    on Jun 27, 2020
  3. leahecole commented on Jun 27, 2020

    @leahecole
    Collaborator

    Hi @GoogleCloudPlatform/firestore-dpe you can't assign an issue to a team so I just assigned it to all of y'all. Please reassign accordingly, and thanks for your help!

  4. removed their assignment
    on Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: datastorepriority: p1type: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions