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
When trying to run a development server for a Flask api the uvicorn reloader appears to duplicate the api route definitions, causing the error shown below. The server runs normally as long as the automatic reloader is disabled.
Since this is my first attempt at api development there's a good chance I simply missed some necessary settings, so any feedback is appreciated.
Expected behaviour
Update of the development server on code changes to .py files.
Actual behaviour
Running the development server with uvicorn and reload=True argument causes the following error on startup:
AssertionError: View function mapping is overwriting an existing endpoint function: index
This triggers either on the first route defined with an @app.route() decorator, or the server url in the openapi specification when no additional routes are defined with the decorator.
Steps to reproduce
install connexion with pip install connexion[flask,uvicorn,swagger-ui]
Description
When trying to run a development server for a Flask api the uvicorn reloader appears to duplicate the api route definitions, causing the error shown below. The server runs normally as long as the automatic reloader is disabled.
Since this is my first attempt at api development there's a good chance I simply missed some necessary settings, so any feedback is appreciated.
Expected behaviour
Update of the development server on code changes to .py files.
Actual behaviour
Running the development server with uvicorn and reload=True argument causes the following error on startup:
AssertionError: View function mapping is overwriting an existing endpoint function: index
This triggers either on the first route defined with an
@app.route()
decorator, or the server url in the openapi specification when no additional routes are defined with the decorator.Steps to reproduce
install connexion with
pip install connexion[flask,uvicorn,swagger-ui]
create app as follows and attempt to run
Additional info:
Output of the commands:
python --version
: Python 3.11.5pip show connexion | grep "^Version\:"
: Version 3.0.6The text was updated successfully, but these errors were encountered: