Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
Python library 3.0.0
-
1
Description
Old Python library supported a way to authenticate when there were arbitrary bucket names. When there is only bucket 'bucket-name', I can still use this with version 2.5
>>> from couchbase.cluster import Cluster, PasswordAuthenticator
>>> cluster = Cluster('couchbase://localhost')
>>> cluster.authenticate(PasswordAuthenticator('username', 'password'))
>>> bucket = cluster.open_bucket('bucket-name')
That works perfectly fine.
However, when I try the example from version 3.0
>>> from couchbase.cluster import Cluster, PasswordAuthenticator, ClusterOptions
>>> from couchbase.auth import PasswordAuthenticator
>>> cluster = Cluster('couchbase://localhost', ClusterOptions(PasswordAuthenticator('username', 'password')))
>>> bucket = cluster.bucket('bucket-name')
>>> collection = bucket.default_collection()
it fails on line with Cluster() and URI. It tries to connect to bucket "default" based on couchbase/management/admin.py:87. Its caller in couchbase/cluster.py:518 doesn't allow specification of the bucket. That is called from couchbase/cluster.py:533.
Request: please add a way to connect when there is no "default" bucket.
Hi this sounds like an issue that we fixed a week or two ago, and should be in 3.0.0 (non-beta). Please could you send the stack trace and details of the version installed?