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

Fix werkzeug import issue by upgrading to v3.0.3 - Internal Server Error #922

Closed
wants to merge 1 commit into from

Conversation

0xWerz
Copy link
Contributor

@0xWerz 0xWerz commented Jun 1, 2024

Description

This PR upgrades the werkzeug library from v2.2.2 to v3.0.3 to resolve the "cannot import name 'url_quote' from 'werkzeug.urls'" error encountered in the AWS Lambda function.

Resolves: #816 #831 #906 #816
-->

Demo URL

Working: https://nextjs-flask-starter-cyan-one.vercel.app/api/python
Failing: https://nextjs-flask-starter.vercel.app/api/python

Type of Change

  • Bug fix

Copy link

vercel bot commented Jun 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-dir-css-in-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
app-dir-i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
app-dir-share-state ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-api-routes-cache-control ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-api-routes-hello-world ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-api-routes-json-response ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-api-routes-query-parameters ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-functions-authed-proxy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-functions-cookies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-functions-news ❌ Failed (Inspect) Jun 1, 2024 9:50am
edge-functions-streams ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-geolocation-country-block ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-middleware-modify-request-header ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
edge-user-agent-based-rendering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
example-auth-with-ory ❌ Failed (Inspect) Jun 1, 2024 9:50am
example-reduce-image-bandwidth-usage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
geolocation-script ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
next-edge-api-route-hello-world ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
next-flask ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
nodejs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
redirect-with-fallback ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
redirects-bloom-filter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-combining-data-fetching-strategies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-image-fallback ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-image-offset ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-loading-web-fonts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-microfrontends ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-microfrontends-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-pagination-with-ssg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-parallel-routes-navbar ❌ Failed (Inspect) Jun 1, 2024 9:50am
solutions-reuse-responses ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-script-component-ad ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-script-component-strategies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
solutions-testing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
wasm-rust-hello-world ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am
wasm-rust-xor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2024 9:50am

Copy link

vercel bot commented Jun 1, 2024

@0xWerz is attempting to deploy a commit to the Vercel Examples Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/flask@3.0.3 environment, eval, filesystem, network 0 1.51 MB

🚮 Removed packages: pypi/flask@2.2.2, pypi/flask@2.2.2

View full report↗︎

leerob pushed a commit that referenced this pull request Jun 17, 2024
Updates our NextJS/Flask example to Flask 3, which also solves the issue
fixed in #926 but in a way that
gets Flask on latest.

This also incorporate the change in
#922 (Thanks @0xWerz ) and closes
#816 #831 #906 #816.

For the Flask2 specific example pins `werkzeug` to avoid transient
dependency errors where it pulls in the incompatible `werkzeug@3.x`


* Next/Flask deploy:
https://nextjs-flask-guc4p7qgk-trek-glowacki.vercel.app/
* Flask 3 deploy: https://flask3-b6hmmqcnd-trek-glowacki.vercel.app/
* Flask 2 deploy: https://flask2-97jddsq6c-trek-glowacki.vercel.app/

---------

Co-authored-by: Musa <78509039+0xWerz@users.noreply.github.com>
@0xWerz 0xWerz closed this Jun 19, 2024
newcharmingdev7 pushed a commit to newcharmingdev7/e-com that referenced this pull request Aug 10, 2024
Updates our NextJS/Flask example to Flask 3, which also solves the issue
fixed in vercel/examples#926 but in a way that
gets Flask on latest.

This also incorporate the change in
vercel/examples#922 (Thanks @0xWerz ) and closes
#816 #831 #906 #816.

For the Flask2 specific example pins `werkzeug` to avoid transient
dependency errors where it pulls in the incompatible `werkzeug@3.x`


* Next/Flask deploy:
https://nextjs-flask-guc4p7qgk-trek-glowacki.vercel.app/
* Flask 3 deploy: https://flask3-b6hmmqcnd-trek-glowacki.vercel.app/
* Flask 2 deploy: https://flask2-97jddsq6c-trek-glowacki.vercel.app/

---------

Co-authored-by: Musa <78509039+0xWerz@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

nextjs-flask example broken
1 participant