djangopymongodnspython

Missing "dnspython" error for django + gninx + gunicorn app, even after installing it to the correct virtual environment


Getting the following Error:

The "dnspython" module must be installed to use mongodb+srv:// URIs

Exception location:

../python3.7/site-packages/pymongo/uri_parser.py, line 428, in parse_uri

When trying to use pymongo with django app. I tried to install dnspython with pip3 to the correct virtual environment but still got the error.

I also tried to re-start gninx.


Solution

  • What solved the problem was simply to re-start the gunicorn service file.