Error for read preference in URI
cosimomeli opened this issue · comments
Hi, if I put a read preference in the URI, like &readPreference=secondaryPreferred, I get this errors:
pymongo-3.4.0: 3 is not a valid read preference (full log attached)
pymongo-3.6.1: AttributeError: type object 'ReadPreference' has no attribute 'secondaryPreferred' (full log attached)
pymongo-3.4.0.log
pymongo-3.6.1.log
Seems like the read_preference param is set to work with pymongo < 3.
Any workaround using only the URI?
+1
The forthcoming 2.0 release (see #110) will fix this, since we're no longer trying to change the URI into keyword arguments for PyMongo. I'll close this once 2.0 is out the door, in case anyone else has run into this problem.
I've just released Flask-PyMongo 2.0 to PyPI.org, so I'm closing this now.