Skip to content

Firestore client v1.8.0 doesn't work with latest google.api_core #82

Closed
@hiranya911

Description

@hiranya911

Environment details

  • OS type and version: Mac
  • Python version: Python 3.6.8
  • pip version: pip 20.1.1
  • google-cloud-firestore version: 1.8.0

Steps to reproduce

  1. Install the latest google-cloud-firestore in a fresh virtualenv sandbox.
Installing collected packages: pytz, six, protobuf, googleapis-common-protos, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, idna, chardet, urllib3, certifi, requests, grpcio, google-api-core, google-cloud-core, google-cloud-firestore
Successfully installed cachetools-4.1.1 certifi-2020.6.20 chardet-3.0.4 google-api-core-1.21.0 google-auth-1.18.0 google-cloud-core-1.3.0 google-cloud-firestore-1.8.0 googleapis-common-protos-1.52.0 grpcio-1.30.0 idna-2.10 protobuf-3.12.2 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-2020.1 requests-2.24.0 rsa-4.6 six-1.15.0 urllib3-1.25.9
  1. Try to run any Firestore API call

Code example

from google.cloud import firestore

db = firestore.Client()
doc = db.collection('users').document('test').get()

Stack trace

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    doc = db.collection('users').document('test').get()
  File "/Users/hkj/Projects/firebase-admin-python/temp/py3/lib/python3.6/site-packages/google/cloud/firestore_v1/collection.py", line 109, in document
    return self._client.document(*child_path)
  File "/Users/hkj/Projects/firebase-admin-python/temp/py3/lib/python3.6/site-packages/google/cloud/firestore_v1/client.py", line 313, in document
    base_path = self._database_string + "/documents/"
  File "/Users/hkj/Projects/firebase-admin-python/temp/py3/lib/python3.6/site-packages/google/cloud/firestore_v1/client.py", line 190, in _database_string
    self.project, self._database
  File "/Users/hkj/Projects/firebase-admin-python/temp/py3/lib/python3.6/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'

Issue originally reported in firebase/firebase-admin-python#475 but is easily reproducible without Firebase Admin SDK as well.

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/python-firestore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions