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

Incompatible with the latest pymongo #41

Open
inaferando opened this issue May 22, 2015 · 2 comments
Open

Incompatible with the latest pymongo #41

inaferando opened this issue May 22, 2015 · 2 comments

Comments

@inaferando
Copy link

keyword 'safe' is not expected in save operations since 3.0 version of pymongo

  File "/usr/local/lib/python2.7/dist-packages/flaskext/mongoalchemy/__init__.py", line 264, in save
    self._session.insert(self, safe=safe)
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 172, in insert
    self.add(item, safe=safe)
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 188, in add
    return self.flush()
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 414, in flush
    result = op.execute()
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/ops.py", line 97, in execute
    return self.collection.save(self.data, safe=self.safe)
  File "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py", line 1898, in save
    write_concern = WriteConcern(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'safe'
@EmergentBehavior
Copy link

Also had this issue and had to stick with an older version. Would be nice if this was addressed.

@fsouza
Copy link
Contributor

fsouza commented Jun 3, 2015

Unfortunately this is a bug with MongoAlchemy. I will pin the pymongo version to ensure that everything works fine, and once it's fixed in MongoAlchemy, I will fix it here as well.

fsouza added a commit that referenced this issue Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants