-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Document breaking change that underlying Flask app can no longer be run directly. #1794
Comments
Hi @tariqjamal-abdulazeez, how are you running the application? You should run the Connexion application directly, not the underlying Flask application. |
@tariqjamal-abdulazeez how to achieve that because i have exactly the same issue ! |
I had a similar issue after upgrading from 2.14.0 and using connexion's FlaskApp instead of the Flask application fixed it. |
Check this discussion for more info #1795 |
@
@RobbeSneyders I tried that also but it does not work for me |
@nickzandbergen I need to achieve this thing in connexion latest version, but using the connexion latest docs with flask version 3.0 it not working properly |
@RobbeSneyders Could you write a documentation for migration step by step ? because really i'm not able to make it works with the new version |
It's hard to write a general guide since users were using Connexion in many different ways. We spent a great amount of effort to update and improve our documentation for Connexion 3. Please try to use it to find your answers there. If you run into specific errors, you can open an issue explaining the error and we can support on that error specifically. If we notice any gaps in our documentation based on these issues, we will update it. |
@RobbeSneyders Previously i had working with flask=2.2.5 and connexion = 2.14.2 with this configuration the application request are correctly but due to some dependency i had upgraded the both package to their latest version, but in that the request are correctly getting in server and flask before_request is executed after then when it try to match the url with openapi duing that getting the issue I had tried all possible according to the docs but it doesn't work for me |
I actually have the same configuration as @tariqjamal-abdulazeez and trying to figure out how to upgrade to Here's how my Flask app entrypoint looks like:
I also use |
Description
When using connexion and flask with the below version
Code
Actual behaviour
`During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/werkzeug/serving.py", line 362, in run_wsgi
execute(self.server.app)
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/werkzeug/serving.py", line 323, in execute
application_iter = app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/flask/app.py", line 1478, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/flask/app.py", line 1458, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/flask/app.py", line 759, in handle_user_exception
return self.ensure_sync(handler)(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tariqjamal/anaconda3/envs/reflex-apps/lib/python3.11/site-packages/connexion/apps/flask.py", line 245, in _http_exception
raise starlette.exceptions.HTTPException(exc.code, detail=exc.description)
starlette.exceptions.HTTPException: 404
`
@spec-first
@RobbeSneyders @Ruwann Like this in another project i'm getting the error
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
The text was updated successfully, but these errors were encountered: