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

Unable to connect to cluster with 3.0.0a4 installed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • None
    • None
    • 1

    Description

      Installed 3.0.0a4 and tried to execute the code from documentation here:

      rom couchbase.cluster import Cluster
      from couchbase_core.cluster import PasswordAuthenticator
      cluster = Cluster('couchbase://10.112.192.101')
      authenticator = PasswordAuthenticator('Administrator', 'password')
      cluster.authenticate(authenticator)
      cb = cluster.bucket('default')
      cb_coll=cb.default_collection()
      cb_coll.upsert('u:king_arthur',

      {'name': 'Arthur', 'email': 'kingarthur@couchbase.com', 'interests': ['Holy Grail', 'African Swallows']}

      )

      1. OperationResult<RC=0x0, Key=u'u:king_arthur', CAS=0xb1da029b0000>

      print(cb_coll.get('u:king_arthur').contentAs[str])

      1. {u'interests': [u'Holy Grail', u'African Swallows'], u'name': u'Arthur', u'email': u'kingarthur@couchbase.com'}
        1. The CREATE PRIMARY INDEX step is only needed the first time you run this script
          cluster.query('CREATE PRIMARY INDEX ON default')

      from couchbase_core.n1ql import N1QLQuery
      row_iter = cluster.query(N1QLQuery('SELECT name FROM default WHERE ' + \
      '$1 IN interests', 'African Swallows'))
      for row in row_iter: print(row)

      Throws the following error:

      Traceback (most recent call last):
      File "test-python3.py", line 3, in <module>
      cluster = Cluster('couchbase://10.112.192.101')
      File "/Users/a.senthilnathan/.pyenv/versions/3.6.8/lib/python3.6/site-packages/couchbase/cluster.py", line 100, in _init_
      raise ArgumentError("Authenticator is mandatory")

      I am using python 3.6.8

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Ellis.Breen Ellis Breen
              arunkumar Arunkumar Senthilnathan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty