Flask-AppBuilder
Flask-AppBuilder copied to clipboard
flask fab create-app returns error
If you'd like to report a bug in Flask-Appbuilder, fill out the template below. Provide any extra information that may be useful
Responsible disclosure: We want to keep Flask-AppBuilder safe for everyone. If you've discovered a security vulnerability please report to [email protected].
Environment
Flask-Appbuilder version: 4.3.10
pip freeze output: apispec==6.3.0 attrs==23.1.0 Babel==2.13.1 blinker==1.7.0 click==8.1.7 colorama==0.4.6 Deprecated==1.2.14 dnspython==2.4.2 email-validator==1.3.1 Flask==2.2.5 Flask-AppBuilder==4.3.10 Flask-Babel==2.0.0 Flask-JWT-Extended==4.5.3 Flask-Limiter==3.5.0 Flask-Login==0.6.3 Flask-SQLAlchemy==2.5.1 Flask-WTF==1.2.1 greenlet==3.0.1 idna==3.6 importlib-resources==6.1.1 itsdangerous==2.1.2 Jinja2==3.1.2 jsonschema==4.20.0 jsonschema-specifications==2023.11.1 limits==3.7.0 markdown-it-py==3.0.0 MarkupSafe==2.1.3 marshmallow==3.20.1 marshmallow-sqlalchemy==0.26.1 mdurl==0.1.2 ordered-set==4.1.0 packaging==23.2 prison==0.2.1 Pygments==2.17.2 PyJWT==2.8.0 python-dateutil==2.8.2 pytz==2023.3.post1 PyYAML==6.0.1 referencing==0.31.0 rich==13.7.0 rpds-py==0.13.1 six==1.16.0 SQLAlchemy==1.4.50 SQLAlchemy-Utils==0.41.1 typing_extensions==4.8.0 Werkzeug==2.3.8 wrapt==1.16.0 WTForms==3.1.1
Describe the expected results
Create a simple app
flask fab create-app
Describe the actual results
error: No suck command 'fab'
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.
Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.
Error: No such command 'fab'.
Steps to reproduce
Which python version do you use ?
Im sorry, i can't reproduce your error. After installing your pip freeze it just works...
ubuntu@ubuntu:~/fab$ flask fab create-app
Your new app name:
Im using python 3.10.12 and pip 22.0.2.
Are you sure you are using the right environment (venv/pipenv if using virtual env's) and you installed the packages under the right user?
I saw this on MacOS with a virtual environment and Python 3.12.1 and flask-appbuilder 4.3.10. When I closed the shell and opened another, reloading the virtual environment the prior error Error: No such command 'fab'.
became the same error I found in Issue #2131. $ pip install distutils
solved it for me.