You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update: Problem with DELETE resolved after dowgrading to Eve 0.7.10 where common.get_document() still passed only 3 arguments to app.data.find_one() but still persist with PUT/PATCH.
In my simple app, I can create and get new items just fine but when I tried a PATCH/PUT/DELETE request then I got the error:
TypeError: find_one() takes 3 positional arguments but 5 were given
The error doesn't appear when Mongodb is used instead of Elasticsearch.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/eve/flaskapp.py", line 1105, in __call__
return super(Eve, self).__call__(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.6/site-packages/eve/endpoints.py", line 100, in item_endpoint
response = deleteitem(resource, **lookup)
File "/usr/local/lib/python3.6/site-packages/eve/methods/common.py", line 317, in rate_limited
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/eve/auth.py", line 80, in decorated
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/eve/methods/common.py", line 1251, in decorated
r = f(resource, **combined_args)
File "/usr/local/lib/python3.6/site-packages/eve/methods/delete.py", line 46, in deleteitem
return deleteitem_internal(resource, concurrency_check=True, **lookup)
File "/usr/local/lib/python3.6/site-packages/eve/methods/delete.py", line 97, in deleteitem_internal
original = get_document(resource, concurrency_check, original, **lookup)
File "/usr/local/lib/python3.6/site-packages/eve/methods/common.py", line 88, in get_document
resource, req, check_auth_value, force_auth_field_projection, **lookup
TypeError: find_one() takes 3 positional arguments but 5 were given
The text was updated successfully, but these errors were encountered:
Update: Problem with DELETE resolved after dowgrading to Eve 0.7.10 where
common.get_document()
still passed only 3 arguments toapp.data.find_one()
but still persist with PUT/PATCH.In my simple app, I can create and get new items just fine but when I tried a PATCH/PUT/DELETE request then I got the error:
TypeError: find_one() takes 3 positional arguments but 5 were given
The error doesn't appear when Mongodb is used instead of Elasticsearch.
My following setup and code:
Source code
API Call
curl -X DELETE \ http://localhost:5000/test/AWjlAAzY-Wkn3SL9OgCa \ -H 'If-Match: 16e79eb4b035c2d25b08f5bb46eeadd8002e4230'
Traceback
The text was updated successfully, but these errors were encountered: