0

I am refactoring a Flask-restful app to Flask-RESTPlus in order to get the Swagger documentation easier integrated.

I have defined endpoint, with a namespace and a model and I get the swagger UI up under http://localhost:8080/api and have the endpoint under http://localhost:8080/api/myendpoint. But when I use my endpoint via

curl -X POST --header 'Content-Type: application/json' -d '{ "info": "bla bla bla" } 'http://localhost:2700/api/myendpoint/'

I receive the following traceback:

Traceback (most recent call last):
  File "C:\venv\lib\site-packages\flask\app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\venv\lib\site-packages\flask\app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "C:\venv\lib\site-packages\flask_restplus\api.py", line 536, in error_router
    return original_handler(e)
  File "C:\venv\lib\site-packages\flask\app.py", line 1569, in handle_exception
    raise e
AssertionError

I have no idea what causes this error in my app because the traceback does not point at my source, it rather lists only the internal stack in the flask module. Any idea how to find out why Flask complains? Is there something typical I forgot to provide in my app?

halloleo
  • 6,554
  • 6
  • 46
  • 88

0 Answers0