运行 通过云函数在 firestore 中发布
Issue in the firestore while running through cloud function
实现了我的 python 代码
我没有使用存储触发器,而是通过云调度程序使用 pubsub 触发器并加载存储桶中存在的文件。
但是当 运行 函数出现错误时。
raise valueerror("文档必须有偶数个路径元素")
我在需求文件中使用 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')
我没有使用存储触发器,而是通过云调度程序使用 pubsub 触发器并加载存储桶中存在的文件。
但是当 运行 函数出现错误时。
raise valueerror("文档必须有偶数个路径元素")
我在需求文件中使用 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')