Skip to content
Advertisement

Select query is working but insert query is not in Python with Couchbase library

I’m trying to do some remote operations with Couchbase Python library. I have written a small code piece to test if it is working as intended.

JavaScript

Select function works well. Query runs and there is no problem. But the other one, which I’m trying to use for inserting, doesn’t work. It gives a timeout error.

JavaScript

What could be the reason? The query is working when I run it in the query section of couchbase interface.

Edit: There is this part in error log: 'endpoint': 'xxxxxx:11210'. Do I need to have an open connection in this port? It seems I don’t have any access right now, since the telnet is not working. If this is the case, that means connecting via 8091 is not enough?

Edit2: We opened connection to port but the same problem exists

Advertisement

Answer

I don’t even know why, but adding .execute() to end of the query solved the problem. SELECT query was already working without it. Also, I needed to open a connection on port 11210

Advertisement