Skip to content

ModuleNotFoundError: No module named 'werkzeug.wsgi.middleware'; 'werkzeug.wsgi' is not a package #1663

@connesy

Description

@connesy

When using from werkzeug.wsgi import DispatcherMiddleware I get a DeprecationWarning:

DeprecationWarning: The import 'werkzeug.wsgi.DispatcherMiddleware' is deprecated and will be removed in Werkzeug 1.0. Use 'from werkzeug.wsgi.middleware.dispatcher import DispatcherMiddleware' instead.
  from werkzeug.wsgi import DispatcherMiddleware

But when I use that instead, I get a ModuleNotFoundError:

Traceback (most recent call last):
  File "services/server.py", line 8, in <module>
    from werkzeug.wsgi.middleware.dispatcher import DispatcherMiddleware
ModuleNotFoundError: No module named 'werkzeug.wsgi.middleware'; 'werkzeug.wsgi' is not a package

Werkzeug version 0.16.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions