You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing to the emulator, not the actual cloud. Recently did a pip install -r requirements.txt which seemed to break this, everything worked before. Unfortunately I don't have that log so can't say exactly what upgraded.
Deprecating urllib3 to 1.26.15 (as suggested here) was no help
Stack Trace
mailer_test.py:50: in create_test_data
db.collection("users").document(user_id).set(user_record)
/usr/local/anaconda3/lib/python3.12/site-packages/google/cloud/firestore_v1/document.py:165: in set
batch, kwargs = self._prep_set(document_data, merge, retry, timeout)
/usr/local/anaconda3/lib/python3.12/site-packages/google/cloud/firestore_v1/base_document.py:214: in _prep_set
batch.set(self, document_data, merge=merge)
/usr/local/anaconda3/lib/python3.12/site-packages/google/cloud/firestore_v1/base_batch.py:112: in set
write_pbs = _helpers.pbs_for_set_no_merge(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
document_path = 'projects/prc-dev/databases/(default)/documents/users/never_sent_any_missing'
document_data = {'timestamp': Sentinel: Value used to set a document field to the server timestamp., 'user_id': 'never_sent_any_missing'}
def pbs_for_set_no_merge(document_path, document_data) -> List[types.write.Write]:
"""Make ``Write`` protobufs for ``set()`` methods.
Args:
document_path (str): A fully-qualified document path.
document_data (dict): Property names and values to use for
replacing a document.
Returns:
List[google.cloud.firestore_v1.types.Write]: One
or two ``Write`` protobuf instances for ``set()``.
"""
extractor = DocumentExtractor(document_data)
if extractor.deleted_fields:
raise ValueError(
"Cannot apply DELETE_FIELD in a set request without "
"specifying 'merge=True' or 'merge=[field_paths]'."
)
set_pb = extractor.get_update_pb(document_path)
if extractor.has_transforms:
field_transform_pbs = extractor.get_field_transform_pbs(document_path)
> set_pb.update_transforms.extend(field_transform_pbs)
E TypeError: Not a cmessage
/usr/local/anaconda3/lib/python3.12/site-packages/google/cloud/firestore_v1/_helpers.py:723: TypeError
Environment details
OS type and version: MacOS 15.5
Python version: 3.12.4
pip version: 24.0
google-cloud-firestore version: 2.17.0
The text was updated successfully, but these errors were encountered:
Thanks for the detailed feedback. It sounds like this error was due to a bad update for one of our dependencies, so I'm going to close for now. If anyone is still seeing this problem, let me know and I'll re-open
This seems to be closely related to issue 778 and issue 680.
Getting
TypeError: Not a cmessage
on version 2.17.0, trying to execute this line:db.collection("users").document(user_id).set(user_record)
Writing to the emulator, not the actual cloud. Recently did a pip install -r requirements.txt which seemed to break this, everything worked before. Unfortunately I don't have that log so can't say exactly what upgraded.
Deprecating urllib3 to 1.26.15 (as suggested here) was no help
Stack Trace
Environment details
google-cloud-firestore
version: 2.17.0The text was updated successfully, but these errors were encountered: