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

Problem with WerkZeug version #47

Open
BiplabG opened this issue Dec 18, 2024 · 0 comments
Open

Problem with WerkZeug version #47

BiplabG opened this issue Dec 18, 2024 · 0 comments

Comments

@BiplabG
Copy link

BiplabG commented Dec 18, 2024

The current version of WebShop (Commit: 64fa2a5) uses Flask 2.1.2 which uses WerkZeug library. WerkZeug recently released its new breaking version 3.x.
Installation of WebShop installs the latest WerkZeug library which is incompatible with the current code.

How to replicate:

  1. Clone the repo.
  2. Run setup.sh
  3. ./run_dev.sh

Error observed:

(.venv) bgautam@c430:~/webshop/WebShop$ ./run_dev.sh 
Traceback (most recent call last):
  File "/home/bgautam/.pyenv/versions/3.10.14/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/bgautam/.pyenv/versions/3.10.14/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/bgautam/webshop/WebShop/web_agent_site/app.py", line 5, in <module>
    from flask import (
  File "/home/bgautam/webshop/.venv/lib/python3.10/site-packages/flask/__init__.py", line 7, in <module>
    from .app import Flask as Flask
  File "/home/bgautam/webshop/.venv/lib/python3.10/site-packages/flask/app.py", line 27, in <module>
    from . import cli
  File "/home/bgautam/webshop/.venv/lib/python3.10/site-packages/flask/cli.py", line 17, in <module>
    from .helpers import get_debug_flag
  File "/home/bgautam/webshop/.venv/lib/python3.10/site-packages/flask/helpers.py", line 14, in <module>
    from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/bgautam/webshop/.venv/lib/python3.10/site-packages/werkzeug/urls.py)

QuickFix: Uninstall the WerkZeug and then install WerkZeug version 2.

pip uninstall Werkzeug
pip install Werkzeug==2.2.2
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

1 participant