Skip to content

Bug: Error to run flask app (cannot import name 'url_quote' from 'werkzeug.urls') #13

@douglasdcm

Description

@douglasdcm

Prerequisites

Describe the issue

Hi, how are you? I faced the following error when running the Flask app as described in the documentation (flask run). I tried with venv of Python 3.8 and 3.11. I fixed the issue doing this. I'm opening this issue just for documentation and to help other people that may face the same issue. Thanks!

Error

/repo/python-starter-kit$ flask run
^[[6~Traceback (most recent call last):
  File "/home/douglas/repo/python-starter-kit/venv38/bin/flask", line 5, in <module>
    from flask.cli import main
  File "/home/douglas/repo/python-starter-kit/venv38/lib/python3.8/site-packages/flask/__init__.py", line 5, in <module>
    from .app import Flask as Flask
  File "/home/douglas/repo/python-starter-kit/venv38/lib/python3.8/site-packages/flask/app.py", line 30, in <module>
    from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/douglas/repo/python-starter-kit/venv38/lib/python3.8/site-packages/werkzeug/urls.py)

Starter kit URL

https://github.com/kinde-starter-kits/python-starter-kit

Operating system(s)

Ubuntu

Operating system version(s)

Ubuntu 20.04.6 LTS

Further environment details

Firefox 124.0.2 (64-bit)

Reproducible test case URL

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions