Error while running sample travel app (travel.py)

hey ,
in travel.py (i added password here and nothing change done here)
Screenshot 2020-03-20 at 6.51.42 PM

if i try to run

am getting that error ,please help me out

@boby are you able to connect to http://localhost:8091 with the same user id Administrator and password 123456 ?
The error message is very clear that the SDK unable to connect to the cluster.
If you have CB installed the default password provided is password unless you have changed it to 123456

@AV25242

hello,
installed couchbase server in my mac(local host) username is Administrator ,password is 123456
and i can access with those details
so i changed to 123456

??

Is it accessible via CB UI ?

yes, i can . and deployed travel-sample bucket too

@AV25242

#server in my mac :
cluster name : localhost
username : Administrator ,
password : password
travel-sample ,sample bucket installed
can access with the help of those credentials to server in ui

#installed all requirements

#in travel.py (i didn’t change any thing)
Screenshot 2020-03-23 at 11.32.44 AM

is there any changes to do in cluster name in travel.py??

error :

please help me out

@boby so my understanding is you changed your cluster password from 123456 to password and UI is showing the cluster and you are able to sneak and peek into the travel-sampel cluster ?

If all of the above is true. Can you please tell me where did you get the travel.py code from ? is it from

the reason I am asking is because the error says travel.py line 319 connect_db..
I dont see the same line number in the code link I have sent you.

This clearly means that py code is not able to connect to the cluster.
what is in the connect_db method
and what are the variable values for

CONNSTR = ‘couchbase://localhost/travel-sample’
PASSWORD = ‘’

if its like above in your code try changing it to

CONNSTR = ‘couchbase://localhost:8091/travel-sample’
PASSWORD = ‘password

hello sir @AV25242
still facing error in db = connect_db() ,

sir instead of trying just say steps :

s1 : Bobys-MacBook-Air:desktop loonycorn$ git clone https://github.com/couchbaselabs/try-cb-python.git
(got this file from link u have sent)
couchbaselabs/try-cb-python

s2:pip install -r requirements.txt (ok done)

s3: new couchbase (server)cluster setuping :
#server in my mac :
cluster name : localhost
username : Administrator ,
password : password
travel-sample ,sample bucket installed
can access with the help of those credentials to server in ui

s4 . python travel.py

now please check out my zip file for travel.py and say changes where have to be done ??
according to my couchbase credentials
please help me out