Skip to content

google-cloud-firestore v1.8.0 release broke compatibility #475

Description

@grkhr

Environment details

  • Operating System version: MacOS 10.14.6 / Google Cloud Functions (both broken)
  • Firebase SDK version: 1.8.0 ?
  • Library version: 4.3.0
  • Firebase Product: cloud firestore

Steps to reproduce

All methods on cloud firestore has broken. With v1.7.0 works well.
Error: module 'google.api_core' has no attribute 'path_template'

Code example

db.collection('users').document(id).get()
db.collection('users').stream()

Stack trace

Traceback (most recent call last):
  File "/user_code/main.py", line 211, in call
    main(request)
  File "/user_code/main.py", line 203, in main
    if handle_message(message):
  File "/user_code/main.py", line 163, in handle_message
    user = get_user_by_chat(message)
  File "/user_code/main.py", line 147, in get_user_by_chat
    user = [i for i in db.collection('users').where('telegramChatId', '==', str(message.chat.id)).limit(1).stream()]
  File "/user_code/main.py", line 147, in <listcomp>
    user = [i for i in db.collection('users').where('telegramChatId', '==', str(message.chat.id)).limit(1).stream()]
  File "/env/local/lib/python3.7/site-packages/google/cloud/firestore_v1/query.py", line 854, in stream
    parent_path, expected_prefix = self._parent._parent_info()
  File "/env/local/lib/python3.7/site-packages/google/cloud/firestore_v1/collection.py", line 125, in _parent_info
    (self._client._database_string, "documents")
  File "/env/local/lib/python3.7/site-packages/google/cloud/firestore_v1/client.py", line 190, in _database_string
    self.project, self._database
  File "/env/local/lib/python3.7/site-packages/google/cloud/firestore_v1/gapic/firestore_client.py", line 105, in database_root_path
    return google.api_core.path_template.expand(
AttributeError: module 'google.api_core' has no attribute 'path_template'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions