How to connect to mongoDB: I'm getting errors when connecting

62 views
Skip to first unread message

Maurice Waka

unread,
Jul 30, 2019, 11:54:28 PM7/30/19
to web2py-users

I was trying out this example, not sure whether its outdated, 


but got this errors:

le "/usr/local/lib/python3.6/dist-packages/pymongo/helpers.py", line 155, in _check_command_response
 
raise OperationFailure(msg % errmsg, code, response)
pymongo
.errors.OperationFailure: Authentication failed.

this was my db line:
db = DAL("mongodb://mwakewaka: blahblaha123**@ds123456.mlab.com:1257467/testriver", check_reserved=["mongodb_nonreserved",],  adapter_args={"safe":False})
However I not that this connection with localhost is ok.

db = DAL('mongodb://localhost/queellness')

Massimo Di Pierro

unread,
Aug 18, 2019, 5:33:00 AM8/18/19
to web2py-users
You have a space in the uri string. could that be a problem?
Reply all
Reply to author
Forward
0 new messages