kinde-starter-kits / python-starter-kit

Starter kit to get going with Python
MIT License
13 stars 5 forks source link

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

Open douglasdcm opened 2 months ago

douglasdcm commented 2 months ago

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

DanielRivers commented 2 months ago

Thanks for posting!

Are you able to open a PR and will get it merged

douglasdcm commented 2 months ago

Thanks for posting!

Are you able to open a PR and will get it merged

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