Closed EnriqueGautoSand closed 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Feel free to reopen it if it's still relevant to you. Thank you
I have several problems trying to pass my application to an executable using auto-py-to-exe that use pyinstaller i have the next files and folders
proyect:
------|app ------------|templates ------------|translations ------------|static ------------| init.py ------------|others.py ------------|views.py ------------|models.py ------|babel ------|app.db ------|run.py ------|config.py
i use this command
pyinstaller --noconfirm --onedir --console --name "pruebafinal" --add-data "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/app.db;." --add-data "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/babel;babel/" --add-data "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/app;app/" --add-data "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/config.py;." --add-data "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/__pycache__;__pycache__/" --hidden-import "flask_appbuilder" --hidden-import "flask" --hidden-import "os" --hidden-import "sys" --hidden-import "webbrowser" --hidden-import "reportlab" --hidden-import "datetime" --hidden-import "sqlalchemy" --hidden-import "flask_babel" --hidden-import "flask_sqlalchemy" --hidden-import "flask_wtf" --hidden-import "PIL" --hidden-import "sqlalchemy" --hidden-import "sqlalchemy_utils" --hidden-import "sqlite3" --hidden-import "wtforms" --hidden-import "xml" --hidden-import "defusedxml" "C:/Users/Usuario/Documents/roberto/roberto/aplicacion/run.py"
first error dont found the templates folder
i put this on my init.py
but i only solve that adding the templates and static folder at level of run.py and in templates foulder i put the appbuilder folder with the others templates this solve the error of template dont found, but have other error when load template dont load bootstrap files and on my config.py i have BABEL_DEFAULT_LOCALE = "es" but load in english
Environment windows 10
Flask-Appbuilder version: F.A.B Version: 3.0.1.
pip freeze output:
Describe the actual results
first problem dont found the index.html template and basetemplate this i solve ading the appbuilder foulder into the templates folders but then in my config.py i have set up BABEL_DEFAULT_LOCALE = "es" but it apears only on spanish
Steps to reproduce
config.py have BABEL_DEFAULT_LOCALE = "es"
in init.py i have