Skip to content

Importing flask_restful raises ModuleNotFoundError: No module named 'flask.views' #4

@osolmaz

Description

@osolmaz

I get the following error importing Flask-Restful 0.3.10 and Quart-Flask-Patch 0.3.0:

Python 3.11.6 (main, Oct 20 2023, 13:48:31) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import quart_flask_patch
>>> import flask_restful
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/onur/Library/Caches/pypoetry/virtualenvs/backend-api-0z_fLC-a-py3.11/lib/python3.11/site-packages/flask_restful/__init__.py", line 6, in <module>
    from flask.views import MethodView
ModuleNotFoundError: No module named 'flask.views'

I don't try to use Flask-Restful with Quart, but the package is still imported in various places in my codebase. So it would be nice if this didn't break simply importing Flask-Restful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions