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

Python server ImportError: cannot import name 'url_quote' from 'werkzeug.urls #2312

Open
NicholasRasi opened this issue Feb 19, 2024 · 1 comment

Comments

@NicholasRasi
Copy link

Bug report

Describe the bug

Error with Python server.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. stripe samples create accept-a-payment
  2. select html as client
  3. select python as server
  4. start the server
  5. error: ImportError: cannot import name 'url_quote' from 'werkzeug.urls'

Expected behavior

The server starts successfully.

System information

  • OS: Linux
  • Server environment: Python

Additional context

Adding a fixed Werkzeug version to the requirements.txt fixes the problem (Werkzeug==2.2.2)

@hideokamoto-stripe
Copy link
Contributor

@NicholasRasi
Thank you for the report. And I'm sorry for the late reply.
I cloned accept-a-payment/payment-element/server/python locally and tried it. The reported error did not occur. The issue may have been resolved when I updated Flask to version 3.0.2 using Dependabot.

Please try downloading the new source code and see if the problem is resolved. If you are still encountering the error, please try updating the Werkzeug version to one that is compatible with Flask 3.0.2 or later and see if that resolves the issue.

Thank you.

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 a pull request may close this issue.

2 participants