Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-918

Version 3 needs access to bucket "default" to connect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.1
    • 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.

      Attachments

        For Gerrit Dashboard: PYCBC-918
        # Subject Branch Project Status CR V

        Activity

          People

            david.kelly David Kelly (Inactive)
            petoju@gmail.com Peter J
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty