Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to pymongo 3.0 breaks pymongo connection #935

Closed
timfeirg opened this issue Apr 8, 2015 · 11 comments
Closed

upgrade to pymongo 3.0 breaks pymongo connection #935

timfeirg opened this issue Apr 8, 2015 · 11 comments
Labels
Milestone

Comments

@timfeirg
Copy link

timfeirg commented Apr 8, 2015

error message as follows:

Exception Type: ConnectionError
Exception Value:    
Cannot connect to database dashboard :
False is not a read preference.

# local variables from django output
conn_settings = {'host': '10.6.2.41', 'port': 27017, 'read_preference': False}
connection_settings  = {'authentication_source': None, 'host': '10.6.2.41', 'port': 27017, 'read_preference': False}

You can see the problem is in 'read_preference', which in mongnengine is False by default, which no longer is valid in pymongo.

@rozza rozza added the Bug label Apr 8, 2015
@rozza
Copy link
Contributor

rozza commented Apr 8, 2015

pymongo 3.0 has just been released and the latest version of pymongo is automatically installed when pip installing mongoengine.

@rozza
Copy link
Contributor

rozza commented Apr 8, 2015

@thedrow @DavidBord I think you might need to release a 0.9.1 with a locked version of pymongo < 3.0 until a pymongo 3.0 compatible version is released.

@rozza
Copy link
Contributor

rozza commented Apr 8, 2015

In the meantime please downgrade pymongo to 2.8:

pip install pymongo==2.8

@thedrow
Copy link
Contributor

thedrow commented Apr 8, 2015

I'm on it.

@MRigal
Copy link
Member

MRigal commented Apr 8, 2015

You're on the 0.9.1 or on the compatibility fix? Else I could work on the 3.0 connection fix

@thedrow
Copy link
Contributor

thedrow commented Apr 8, 2015

If you can work on the connection fix that would be best.

@MRigal
Copy link
Member

MRigal commented Apr 9, 2015

OK, I did my best, it fixes this issue, but needs some more work on other points, #946

@MRigal
Copy link
Member

MRigal commented Apr 9, 2015

What about the 0.9.1 @thedrow ?

@shea256
Copy link

shea256 commented Apr 21, 2015

thank you @rozza this downgrade worked perfectly

@thedrow
Copy link
Contributor

thedrow commented Apr 21, 2015

@MRigal I'm waiting for votes on #946.
If it's mergable I'll release 0.9.1.

@MRigal
Copy link
Member

MRigal commented May 11, 2015

PyMongo3 support was merged in master, you may use it directly or wait a bit of time for next mongoengine release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants