通过云功能运行时在消防仓库中出现问题



我已经按照https://github.com/GoogleCloudPlatform/solutions-gcs-bq-streaming-functions-python/blob/master/functions/streaming/main.py

我通过云调度程序使用pubsub触发器,并加载存储桶中的文件,而不是存储触发器。

但在运行函数时,我得到了以下错误。

提升值错误("文档必须具有偶数个路径元素"(

我在需求文件中使用的是firestore 1.8.1版本。

有人能告诉我这里出了什么问题吗?

该错误意味着您正试图将Firestore集合用作文档。检查您的所有Firestore文档路径是否正确。

# Odd number of path elements means it's a collection, not a doc
doc_ref_error = db.document('collection/document/subcollection')
# Fixed
doc_ref = db.document('collection/document/subcollection/subdocument')

最新更新