Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new installation causes errors. FAB won't start. #2265

Open
richlysakowski opened this issue Aug 12, 2024 · 1 comment
Open

new installation causes errors. FAB won't start. #2265

richlysakowski opened this issue Aug 12, 2024 · 1 comment

Comments

@richlysakowski
Copy link

Environment

Flask-Appbuilder version: 4.5.0
Python 3.12.5
sqlalchemy 1.4.49

Describe the expected results

I created a new environment on Windows 10 Professional.

conda create -n flask_appbuilder_tools python conda pip flask-appbuilder sqlalchemy

I have a lot of experience with conda and it is my preferred way to build production systems.
This is my first time trying FAB.

Tell us what should happen.

FAB should open up without errors. 

Describe the actual results

Tell us what happens instead.

Getting an error message:

(flask_appbuilder_tools) C:\Users\PowerUser\fab_first>flask fab create-admin
Username [admin]:
User first name [admin]:
User last name [user]:
Email [[email protected]]:
Password:
Repeat for confirmation:
Error: The two entered values do not match.
Password:
Repeat for confirmation:
Usage: flask fab create-admin [OPTIONS]
Try 'flask fab create-admin --help' for help.

Error: While importing 'app', an ImportError was raised:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\flask\cli.py", line 219, in locate_app
import(module_name)
File "C:\Users\PowerUser\fab_first\app_init_.py", line 14, in
app.config.from_object("config")
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\flask\config.py", line 231, in from_object
obj = import_string(obj)
^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\werkzeug\utils.py", line 612, in import_string
raise ImportStringError(import_name, e).with_traceback(
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\werkzeug\utils.py", line 596, in import_string
import(import_name)
werkzeug.utils.ImportStringError: import_string() failed for 'config'. Possible reasons are:

  • missing init.py in a package;
  • package or module path not included in sys.path;
  • duplicated package or module name taking precedence in sys.path;
  • missing module, class, function or variable;

Debugged import:

  • 'config' not found.

Original exception:

ModuleNotFoundError: No module named 'config'

Steps to reproduce

I tried starting it several times and got the same error. Anything I type I get the "config not found" fatal error.

#############################################################

I tried to get version information and got similar error...

flask fab version
Usage: flask fab version [OPTIONS]
Try 'flask fab version --help' for help.

Error: While importing 'app', an ImportError was raised:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\flask\cli.py", line 219, in locate_app
import(module_name)
File "C:\Users\PowerUser\fab_first\app_init_.py", line 14, in
app.config.from_object("config")
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\flask\config.py", line 231, in from_object
obj = import_string(obj)
^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\werkzeug\utils.py", line 612, in import_string
raise ImportStringError(import_name, e).with_traceback(
File "C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools\Lib\site-packages\werkzeug\utils.py", line 596, in import_string
import(import_name)
werkzeug.utils.ImportStringError: import_string() failed for 'config'. Possible reasons are:

  • missing init.py in a package;
  • package or module path not included in sys.path;
  • duplicated package or module name taking precedence in sys.path;
  • missing module, class, function or variable;

Debugged import:

  • 'config' not found.

Original exception:

ModuleNotFoundError: No module named 'config'

##############################################################

Here is what the environment looks like:

(flask_appbuilder_tools) C:\Users\PowerUser\fab_first>conda list

packages in environment at C:\ProgramData\Anaconda3\envs\flask_appbuilder_tools:

Name Version Build Channel

apispec 6.6.1 pyhd8ed1ab_0 conda-forge
archspec 0.2.3 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py312he70551f_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
attrs 24.2.0 pyh71513ae_0 conda-forge
babel 2.14.0 pyhd8ed1ab_0 conda-forge
bcrypt 4.2.0 py312h2615798_0 conda-forge
blinker 1.8.2 pyhd8ed1ab_0 conda-forge
boltons 24.0.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py312h53d5487_1 conda-forge
bzip2 1.0.8 h2466b09_7 conda-forge
ca-certificates 2024.7.4 h56e8100_0 conda-forge
certifi 2024.7.4 pyhd8ed1ab_0 conda-forge
cffi 1.17.0 py312h4389bb4_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
click 8.1.7 win_pyh7428d3b_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
colour 0.1.5 pyhd8ed1ab_1 conda-forge
conda 24.7.1 py312h2e8e312_0 conda-forge
conda-libmamba-solver 24.7.0 pyhd8ed1ab_0 conda-forge
conda-package-handling 2.3.0 pyh7900ff3_0 conda-forge
conda-package-streaming 0.10.0 pyhd8ed1ab_0 conda-forge
cryptography 43.0.0 py312h9500af3_0 conda-forge
deprecated 1.2.14 pyh1a96a4e_0 conda-forge
distro 1.9.0 pyhd8ed1ab_0 conda-forge
dnspython 2.6.1 pyhd8ed1ab_1 conda-forge
email-validator 2.2.0 pyhd8ed1ab_0 conda-forge
flask 2.3.3 pyhd8ed1ab_0 conda-forge
flask-appbuilder 4.5.0 pyhd8ed1ab_0 conda-forge
flask-babel 2.0.0 pyhd8ed1ab_1 conda-forge
flask-jwt-extended 4.6.0 pyhd8ed1ab_0 conda-forge
flask-limiter 3.8.0 pyhd8ed1ab_0 conda-forge
flask-login 0.6.3 pyhd8ed1ab_1 conda-forge
flask-sqlalchemy 2.5.1 pyhd8ed1ab_0 conda-forge
flask-wtf 1.2.1 pyhd8ed1ab_0 conda-forge
fmt 10.2.1 h181d51b_0 conda-forge
frozendict 2.4.4 py312h4389bb4_0 conda-forge
furl 2.1.3 pyhd8ed1ab_0 conda-forge
greenlet 3.0.3 py312h53d5487_0 conda-forge
h2 4.1.0 pyhd8ed1ab_0 conda-forge
hpack 4.0.0 pyh9f0ad1d_0 conda-forge
hyperframe 6.0.1 pyhd8ed1ab_0 conda-forge
idna 3.7 pyhd8ed1ab_0 conda-forge
importlib-metadata 8.2.0 pyha770c72_0 conda-forge
importlib-resources 6.4.0 pyhd8ed1ab_0 conda-forge
importlib_resources 6.4.0 pyhd8ed1ab_0 conda-forge
infinity 1.5 pyhd8ed1ab_0 conda-forge
intervals 0.9.2 pyhd8ed1ab_0 conda-forge
itsdangerous 2.2.0 pyhd8ed1ab_0 conda-forge
jinja2 3.1.4 pyhd8ed1ab_0 conda-forge
jsonpatch 1.33 pyhd8ed1ab_0 conda-forge
jsonpointer 3.0.0 py312h2e8e312_0 conda-forge
jsonschema 4.23.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.12.1 pyhd8ed1ab_0 conda-forge
krb5 1.21.3 hdf4eb48_0 conda-forge
libarchive 3.7.4 haf234dc_0 conda-forge
libcurl 8.9.1 h18fefc2_0 conda-forge
libexpat 2.6.2 h63175ca_0 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libiconv 1.17 hcfcfb64_2 conda-forge
libmamba 1.5.8 h3f09ed1_0 conda-forge
libmambapy 1.5.8 py312h66cf91f_0 conda-forge
libsolv 0.7.30 hbb528cf_0 conda-forge
libsqlite 3.46.0 h2466b09_0 conda-forge
libssh2 1.11.0 h7dfc565_0 conda-forge
libxml2 2.12.7 h0f24e4e_4 conda-forge
libzlib 1.3.1 h2466b09_1 conda-forge
limits 3.13.0 pyhd8ed1ab_0 conda-forge
lz4-c 1.9.4 hcfcfb64_0 conda-forge
lzo 2.10 hcfcfb64_1001 conda-forge
markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.5 py312he70551f_0 conda-forge
marshmallow 3.21.3 pyhd8ed1ab_0 conda-forge
marshmallow-sqlalchemy 0.28.2 pyhd8ed1ab_0 conda-forge
mdurl 0.1.2 pyhd8ed1ab_0 conda-forge
menuinst 2.1.2 py312h275cf98_0 conda-forge
openssl 3.3.1 h2466b09_2 conda-forge
ordered-set 4.1.0 pyhd8ed1ab_0 conda-forge
orderedmultidict 1.0.1 pyhd8ed1ab_1 conda-forge
packaging 24.1 pyhd8ed1ab_0 conda-forge
passlib 1.7.4 pyhd8ed1ab_1 conda-forge
pendulum 3.0.0 py312h426fad5_0 conda-forge
phonenumbers 8.13.43 pyhd8ed1ab_0 conda-forge
pip 24.2 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.2.2 pyhd8ed1ab_0 conda-forge
pluggy 1.5.0 pyhd8ed1ab_0 conda-forge
prison 0.2.1 pyhd8ed1ab_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.6 py312he70551f_0 conda-forge
pycparser 2.22 pyhd8ed1ab_0 conda-forge
pygments 2.18.0 pyhd8ed1ab_0 conda-forge
pyjwt 2.9.0 pyhd8ed1ab_1 conda-forge
pysocks 1.7.1 pyh0701188_6 conda-forge
python 3.12.5 h889d299_0_cpython conda-forge
python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge
python_abi 3.12 4_cp312 conda-forge
pytz 2024.1 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.2 py312h4389bb4_0 conda-forge
referencing 0.35.1 pyhd8ed1ab_0 conda-forge
reproc 14.2.4.post0 hcfcfb64_1 conda-forge
reproc-cpp 14.2.4.post0 h63175ca_1 conda-forge
requests 2.32.3 pyhd8ed1ab_0 conda-forge
rich 13.7.1 pyhd8ed1ab_0 conda-forge
rpds-py 0.20.0 py312h2615798_0 conda-forge
ruamel.yaml 0.18.6 py312he70551f_0 conda-forge
ruamel.yaml.clib 0.2.8 py312he70551f_0 conda-forge
setuptools 72.1.0 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.1 pyhd8ed1ab_0 conda-forge
sqlalchemy 1.4.49 py312he70551f_1 conda-forge
sqlalchemy-utils 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-arrow 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-babel 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-base 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-color 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-encrypted 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-intervals 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-password 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-pendulum 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-phone 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-timezone 0.41.2 pyhd8ed1ab_0 conda-forge
sqlalchemy-utils-url 0.41.2 pyhd8ed1ab_0 conda-forge
time-machine 2.15.0 py312h4389bb4_0 conda-forge
tk 8.6.13 h5226925_1 conda-forge
tqdm 4.66.5 pyhd8ed1ab_0 conda-forge
truststore 0.8.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.9.0.20240316 pyhd8ed1ab_0 conda-forge
typing-extensions 4.12.2 hd8ed1ab_0 conda-forge
typing_extensions 4.12.2 pyha770c72_0 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 2.2.2 pyhd8ed1ab_1 conda-forge
vc 14.3 h8a93ad2_20 conda-forge
vc14_runtime 14.40.33810 ha82c5b3_20 conda-forge
vs2015_runtime 14.40.33810 h3bf8584_20 conda-forge
werkzeug 3.0.3 pyhd8ed1ab_0 conda-forge
wheel 0.44.0 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge
wrapt 1.16.0 py312he70551f_0 conda-forge
wtforms 3.1.2 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
yaml-cpp 0.8.0 h63175ca_0 conda-forge
zipp 3.19.2 pyhd8ed1ab_0 conda-forge
zstandard 0.23.0 py312h7606c53_0 conda-forge
zstd 1.5.6 h0ea2cb4_0 conda-forge

@fedepad
Copy link
Contributor

fedepad commented Aug 14, 2024

Are you sure you have the config module inside this fab_first in some way?
It's very hard to find the error if you don't show:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants