1

I am trying to connect to my couchbase database. I connect to my couchbase server on browser successfully like this : X.X.X.X:8091 But when I want to connect to that using python script I get this error :

SystemError: <method '_connect' of 'Client' objects> returned a result with an error set

and this is my python script

from couchbase.cluster import Cluster, ClusterOptions
from couchbase.auth import PasswordAuthenticator
cluster = Cluster('couchbase://X.X.X.X', ClusterOptions(PasswordAuthenticator('Administrator', '12345678')))
print(cluster)
Obtice
  • 1,205
  • 3
  • 18
  • 44

1 Answers1

0

The above code snippet is only creating a cluster object. In order to access the data, you can either use the Key-Value operations or run queries against the buckets containing your data.

I can recommend you to take a look at the samples on the Couchbase Playground where you can run Python code against Couchbase clusters from your browser without installing anything.

The code samples would cover common scenarios on how to use the Python SDK to connect to your Couchbase cluster.

If you have some specific questions about using the Python SDK, please ask.

nithishr
  • 596
  • 1
  • 7
  • 17