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
Throw Exception Unknown modifier: $pushAll when run update(push_all) #1729
Comments
I am receiving similar errors when I run tests on master. I was able to find someone running into a similar error on the From this I was led to the official mongodb ticket tracking, where it looks like they have completely removed the I was running my tests with an instance of mongodb v3.6.1, which is what I believe is throwing the bug. I am assuming that @dhamada was running on similar version of mongodb. Could you confirm this by running the following in your terminal and posting the output:
This may mean that mongoengine is currently not compatible with the latest version of MongoDB. A quick look at the PyMongo code shows that the |
I have begun working on a fix for this issue, but have encountered an issue that I do not believe that I have the authority of correcting. The new PyMongo methods that are suggested ( A potential way that this may be executed without deprecating the ability to change the write concerns on update would be something like the following: def update(...):
...
with set_write_concern(queryset._collection, write_concerns):
result = queryset._collection.update_one(...)
... In this example the
This would ensure that when a user overrides the write concerns for a single query, then they do not persist to any subsequent queries. |
After spending a little more time reviewing the issue, I determined that resolving this would be possible without implementing the calls to PyMongo's The issues that I expressed above should be tackled as a separate issue, as the PyMongo |
related fix is merged |
This error does not occur when running with docker-compose on macOS, but it occur when running with docker-compose on ubuntu16.04 on windows virtualbox.
How can I avoid this error?
The text was updated successfully, but these errors were encountered: