I get this error when trying to the hit an endpoint :
The "dnspython" module must be installed to use mongodb+srv:// URIs
What is the config needed to tell pymongo parser to parse a mongo+srv URI.
I know the code is looking for _HAVE_DNSPYTHON flag but not sure how I configure that.
I know this flag is imported like this: from pymongo.uri_parser import parse_uri, split_hosts, _HAVE_DNSPYTHON
Do I need to pass a flag in MONGO_OPTIONS?
Any help will be greatly appreciated!
![]() | Gabriel Wainer gab...@tiquetaque.com skype: gabrielcw www.tiquetaque.com TiqueTaque. Chegamos na hora certa |
--
You received this message because you are subscribed to the Google Groups "Eve REST Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-eve+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So I just add it to the requirement.txt in the eve app and pymongo should be happy with that?
with no other change in code in the eve app?
![]() | Gabriel Wainer gab...@tiquetaque.com skype: gabrielcw www.tiquetaque.com TiqueTaque. Chegamos na hora certa |
--
You received this message because you are subscribed to the Google Groups "Eve REST Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-eve+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So, the dnspython helped fixed that error, but pymongo now throws this error:
pymongo.errors.OperationFailure: Authentication failed.
This is the URI I pass to Eve:
mongodb+srv://username:password@cluster-name/app-db-name?ssl=true&authSource=admin
I can connect to the DB via the shell with no problem.
I do a DB conn check in the eve app which seems to have no issue with the connection:
try:
client = MongoClient(mongoUri)
db = client[mongoDbName]
dbconnStatusJsonString = 'Connection Successful!'
except Exception as e:
dbconnStatusJsonString = 'Please check your connection : ' + str(e) + ' .Actual URI:'+ mongoUri
I am on the latest Eve