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

ImportError: cannot import name 'url_quote' from 'werkzeug.urls' #12

Open
mihirkoladiya opened this issue Dec 24, 2023 · 2 comments
Open

Comments

@mihirkoladiya
Copy link

Exercise URL

vscode ➜ /workspaces/mslearn-python-products (main) $ python app.py
Traceback (most recent call last):
  File "/workspaces/mslearn-python-products/app.py", line 1, in <module>
    from flask import Flask
  File "/home/vscode/.local/lib/python3.11/site-packages/flask/__init__.py", line 7, in <module>
    from .app import Flask as Flask
  File "/home/vscode/.local/lib/python3.11/site-packages/flask/app.py", line 28, in <module>
    from . import cli
  File "/home/vscode/.local/lib/python3.11/site-packages/flask/cli.py", line 18, in <module>
    from .helpers import get_debug_flag
  File "/home/vscode/.local/lib/python3.11/site-packages/flask/helpers.py", line 16, in <module>
    from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/vscode/.local/lib/python3.11/site-packages/werkzeug/urls.py)
@PioneerWxy
Copy link

I had the same problem, and found werkzeug version is too high. You can try pip install Werkzeug==2.2.2.

@Tambros
Copy link

Tambros commented Jan 15, 2024

@PioneerWxy Thank you for this hint. With your hint it works!

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

No branches or pull requests

3 participants