Hi, I’m a bit stuck and I’d like some help. I have get an error when executing a query at a close interval:
File "/Users/myUser/project/api/venv/lib/python3.8/site-packages/couchbase_core/n1ql.py", line 415, in _submit_query return self._parent._n1ql_query(self._params.encoded, couchbase.exceptions.ObjectThreadException: <Couldn't lock. If LOCKMODE_WAIT was passed, then this means that something has gone wrong internally. Otherwise, this means you are using the Connection object from multiple threads. This is not allowed (without an explicit lockmode=LOCKMODE_WAIT constructor argument, C Source=(src/oputil.c,668)>
I’m connecting with the following code:
cluster = Cluster('couchbase://my_server_ip', ClusterOptions(PasswordAuthenticator('Administrator', 'pw'), lockmode=2)) cb = cluster.bucket('mybucket') cb_coll = cb.default_collection()
I’ve added LOCKMODE_WAIT to the cluster options but I get the error anyway, I don’t really know what I should do, could you help me please ?
Edit: I’m using the Python 3.0.2 SDK