-
Notifications
You must be signed in to change notification settings - Fork 211
PyMongo 3 compatibility #207
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
Comments
"auto_start_request" option is gone, "max_pool_size" renamed to "maxPoolSize", "safe" is gone, "_connect" is renamed "connect". Closes issue django-nonrel#207.
i am also getting errro while using syncdb , and i can't able to work with mongoDB , any help, how can i solve it |
I was following the instructions from this site and am now encountering issues I believe are related.
while attempting to circumvent by modifying django_mongodb_engine/base.py:
Versions: Is there something I'm missing? |
Cursor's "fields" argument was renamed "projection" in PyMongo 3: https://github.com/mongodb/mongo-python-driver/blob/3.0.1/pymongo/cursor.py#L101 The change was made to match the new CRUD API spec that unifies argument names among all MongoDB drivers (Java, C++, etc. etc.). An irritating quirk of Python is that object destructors run, even if the constructor couldn't be called due to an argument error. So in this case the Cursor.__id attribute was never set because the constructor wasn't called, but the destructor tries to access it anyway. Short story: once we deal with the test failures, part of upgrading django_mongodb_engine to PyMongo 3 will be replacing the "fields" argument name with "projection" when creating a Cursor. |
Exception AttributeError: "'DebugCursor' object has no attribute '_Cursor__id'" Is there any way to clear the error? |
Try installing older stable version of Pymongo |
Yes. You need to fix your pymongo version to be
There's a fix for this in #213 On Friday, June 19, 2015, jayachandp [email protected] wrote:
[image: Knowsis Ltd] http://www.knowsis.com/ Mark Unsworth / CTO Knowsis Ltd Office: +44 (0) 203 286 6950 This e-mail message may contain confidential or legally privileged |
You can close this one out now. Fixed in #214 |
Thanks for picking this up Mark! |
"auto_start_request" option is gone, "max_pool_size" renamed to "maxPoolSize", "safe" is gone, "_connect" is renamed "connect".
The text was updated successfully, but these errors were encountered: