I am trying to retrieve a document from firestore using python but I keep seeing a context error. Upon some research I found that the firebase_admin sdk is using async calls and python is not waiting, but with that knowledge I am still unable to successfully call the .get() method on a collection reference. Here is an example:
firebase_admin.initialize_app(cred)
db = firestore.client()
subscription_data = db.collection("subscriptions").document(purchaseToken)
doc = subscription_data.get()
This is the error on the server:
RuntimeError: cannot exit context: thread state references a different context object
I did attempt to use asyncio with no luck.