mongoengine: Cannot connect to database default : False is not a read preference.
I use connect(host='mongodb://username:password@localhost:port/database')
in my django settings.py
.
Run server then got a report:
mongoengine.connection.ConnectionError: Cannot connect to database default :
False is not a read preference.
Is this a bug or not?
Write in python 3.4.3
with django 1.8
and mongoengine 0.9.0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 38 (6 by maintainers)
@lukaspetr Add
pymongo==2.8.1
in yourrequirements.txt
Let’s close this, it’s old and most likely a problem in the argument of connect
Trying to use mongonengine with django, I have to use mongoengine 0.9.0. So now I also have to downgrade pymongo to 2.8. Not good…