Connecting to MongoDB fails. Password must be all lowercase?

117 views
Skip to first unread message

mustafa abdelhamid

unread,
Jun 20, 2016, 3:51:06 PM6/20/16
to robotframework-users
Hi all,



So I'm using RIDE and attempting to connect to MongoDB using the mongodblibrary. I noticed that whatever I enter for the host argument, it always makes it lower string. This is problematic because the password for my Mongo server has several upper case letters in it. I have tried to use the '\' escape character but it doesn't help. Any ideas? Thanks!

Jerry S.

unread,
Jun 20, 2016, 6:20:46 PM6/20/16
to robotframework-users
I just looked at the code for this library and the connection string in particular.  There is nothing that is forcing lowercase that I can see.  What version of pymongo do you have installed?  How about Robotframework version?  Can you send an example testcase/suite?

Thanks,
Jerry S

mustafa abdelhamid

unread,
Jun 22, 2016, 12:54:26 PM6/22/16
to robotframework-users
I have the latest version of Pymongo and RobotFramework (I checked with pip). The connection string is forced to lowercase when I surround it with the '[' ']' brackets. I do this because to connect to Mongo with credentials,I have to enter the username and password separated by a colon. When running the test case, I get a "sa:passw0rd!@192.168.222.5:27017: [Errno 11003] getaddrinfo failed". Notice the password in lower case. If I start up Mongo locally, I am able to connect to it without credentials and retrieve the databases. I could also connect to the same server without credentials successfully (but without permissions) I have attached screenshots below and refer to the highlighted portions. Please note, I'm using RIDE to write and execute the test cases.
1.PNG
2.PNG
Message has been deleted

accura...@gmail.com

unread,
Jul 8, 2016, 11:47:16 AM7/8/16
to robotframework-users
Hi Mustafa,

Have you had any luck resolving this?
I have discovered that my credentials seem to be processed correctly if I prefix with mongodb://


maybe that will work for you too?
(I don't need the mongodb:// if I don't use authentication)
Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages