【发布时间】:2021-08-23 08:29:29
【问题描述】:
我正在尝试从我的 Flask 服务器访问我的 Firestore 文档和集合。但是任何 get() 或 stream() 调用都会挂起,例如:
firestore_db.collection('users').get()
我知道我的服务凭证是有效的。我的 Firestore 调用在烧瓶应用程序之外执行良好。此外,当我创建一个新的、非常简单的 Flask 应用程序(就像这里的这个:https://stackoverflow.com/a/52680204/6424258)时,Firestore 调用工作。
关于我的完整 Flask 应用程序(也使用 sqlAlchemy 和 PostGres)的某些问题似乎扰乱了我与 Firebase 的连接。
调用 Firestore 后,我在日志文件中看到了这一点:
Checking ***credfile***.json for explicit credentials as part of auth process...
Making request: POST https://oauth2.googleapis.com/token
Starting new HTTPS connection (1): oauth2.googleapis.com:443
我使用的是 Python 3.6。
【问题讨论】:
标签: python flask google-cloud-firestore