Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Conversation

@hayk96
Copy link
Contributor

@hayk96 hayk96 commented Oct 31, 2023

What this PR does / why we need it:

  • Adding module Werkzeug with version 2.2.2

Problem

  • As the Werkzeug 3.0.0 was released and Flask doesn't specify the dependency correctly, we get the following error when running the apps
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/calendar_app/app.py", line 8, in <module>
    from flask import Flask
  File "/usr/local/lib/python3.12/site-packages/wrapt/importer.py", line 182, in _exec_module self.loader.exec_module(module)
  File "/usr/local/lib/python3.12/site-packages/ddtrace/internal/module.py", line 220, in _exec_module
    self.loader.exec_module(module)
  File "/usr/local/lib/python3.12/site-packages/flask/__init__.py", line 5, in <from .app import Flask as Flask
  File "/usr/local/lib/python3.12/site-packages/ddtrace/internal/module.py", line 220, in _exec_module self.loader.exec_module(module)
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 30, in <module>
  from werkzeug.urls import url_quote
  ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.12/site-packages/werkzeug/urls.py). Did you mean: 'unquote'?

Solution

  • Added specific version Werkzeug==2.2.2 in the requirements.txt file in order to fix the issue

Add Werkzeug module
@vinhloc30796
Copy link

Upvoting because I saw the same thing in #5

@jszwedko
Copy link

I just ran into this today too.

Copy link

@jonbodner jonbodner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonbodner jonbodner merged commit 3ba9e49 into DataDog:main Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants