WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Problem with WerkZeug version #47

@BiplabG

Description

@BiplabG

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions