We have been using v3.0.10 of the Python SDK. I am attempting to upgrade to 3.2.0, but my various collection calls are now failing - no change to code. So, for example, this query works with 3.0.10 but fails with 3.2.0
result = collection.get(‘0629a077-80e0-4fa2-8302-fd321e445266’)
Traceback (most recent call last):
File “”, line 1, in
File “/home/bvadm2/venv2/lib/python3.8/site-packages/couchbase/collection.py”, line 273, in wrapped
return func(self, *args, **kwargs)
File “/home/bvadm2/venv2/lib/python3.8/site-packages/couchbase/result.py”, line 505, in wrapped
x, options = func(*args, **kwargs)
File “/home/bvadm2/venv2/lib/python3.8/site-packages/couchbase/collection.py”, line 497, in get
return self._get_generic(key, kwargs, options)
File “/home/bvadm2/venv2/lib/python3.8/site-packages/couchbase/collection.py”, line 461, in _get_generic
x = CoreClient.get(self.bucket, key, **opts)
File “/home/bvadm2/venv2/lib/python3.8/site-packages/couchbase_core/client.py”, line 409, in get
return super(Client, self).get(*args, **kwargs)
couchbase.exceptions.CouchbaseException: <Key=‘0629a077-80e0-4fa2-8302-fd321e445266’, RC=0x407[LCB_ERR_KVENGINE_INVALID_PACKET (1031)], Operational Error, Results=1, C Source=(src/multiresult.c,312), Context={‘status_code’: 4, ‘opaque’: 11, ‘cas’: 0, ‘key’: ‘0629a077-80e0-4fa2-8302-fd321e445266’, ‘bucket’: ‘workflows’, ‘collection’: ‘instances’, ‘scope’: ‘_default’, ‘context’: ‘Request must include key’, ‘ref’: ‘’, ‘endpoint’: ‘couchdev.bluevolt.io:11210’, ‘type’: ‘KVErrorContext’}, Tracing Output={“0629a077-80e0-4fa2-8302-fd321e445266”: {“debug_info”: {“FILE”: “src/callbacks.c”, “FUNC”: “value_callback”, “LINE”: 840}}}>
For what its worth, this query DOES work with v3.2.0:
rows = cluster.query(“SELECT * FROM workflows
._default
.instances
WHERE meta().id = $1”, QueryOptions(positional_parameters=[‘0629a077-80e0-4fa2-8302-fd321e445266’]))
Of course, our real problem is that we need to use the collection.replace() method to completely replace a document and that fails – all collection methods are failing in 3.2.0
Any insight/assistance would be greatly appreciated!!
Sincerely,
Lee Roder