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
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
from google.cloud import ndb
with get_datastore_context():
class Test(ndb.Model):
prop = ndb.JsonProperty(compressed=True, json_type=dict)
a = Test()
a.put()
I get an exception:
Traceback (most recent call last):
a.put()
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/_options.py", line 91, in wrapper
return wrapped(*pass_args, _options=_options, **kwargs)
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/model.py", line 4917, in _put
return self._put_async(_options=_options).result()
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/tasklets.py", line 190, in result
self.check_success()
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/tasklets.py", line 137, in check_success
raise self._exception
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/tasklets.py", line 293, in _advance_tasklet
yielded = self.generator.send(send_value)
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/model.py", line 4974, in put
ds_entity = _entity_to_ds_entity(self)
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/model.py", line 718, in _entity_to_ds_entity
names = prop._to_datastore(entity, data)
File "<venv>/lib/python3.7/site-packages/google/cloud/ndb/model.py", line 2482, in _to_datastore
if not value.startswith(_ZLIB_COMPRESSION_MARKER):
AttributeError: 'NoneType' object has no attribute 'startswith'