ModuleNotFoundError: No module named 'flask.scaffold'
- Dominant language
- Python
- Stars
- 36.9k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Summary[问题简述(一句话)]**
A clear and concise description of what the issue is.
python web.py
Traceback (most recent call last):
File "D:\PythonTools\Anaconda3\envs\voice\lib\site-packages\flask_restx\api.py", line 18, in
from flask.helpers import _endpoint_from_view_func
ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' (D:\PythonTools\Anaconda3\envs\voice\lib\site-packages\flask\helpers.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PythonProject\MockingBird\web.py", line 1, in
from web import webApp
File "D:\PythonProject\MockingBird\web\__init__.py", line 1, in
from web.api import api_blueprint
File "D:\PythonProject\MockingBird\web\api\__init__.py", line 2, in
from flask_restx import Api
File "D:\PythonTools\Anaconda3\envs\voice\lib\site-packages\flask_restx\__init__.py", line 2, in
from .api import Api # noqa
File "D:\PythonTools\Anaconda3\envs\voice\lib\site-packages\flask_restx\api.py", line 20, in
from flask.scaffold import _endpoint_from_view_func
ModuleNotFoundError: No module named 'flask.scaffold'
**Env & To Reproduce[复现与环境]**
描述你用的环境、代码版本、模型
os:windows11
python version:3.9.18
torch version:torch-1.9.0+cu102-cp39-cp39-win_amd64
**Screenshots[截图(如有)]**
If applicable, add screenshots to help

Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running `python web.py` in the reported Windows/Python 3.9 environment and inspect the installed Flask and flask-restx versions. Trace the import from `web.py` through `web/api/__init__.py` into `flask_restx/api.py`; done means the application starts without the reported import errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100