YunoHost-Apps / fittrackee_ynh

FitTrackee package for YunoHost 🚴
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
4 stars 1 forks source link

ftcli doesn't work as described #67

Closed chri2 closed 3 months ago

chri2 commented 3 months ago
# pushd /var/www/fittrackee/
    source /var/www/fittrackee/venv/bin/activate
/var/www/fittrackee /usr/share/yunohost/hooks
(venv) root@yt:/var/www/fittrackee# ftcli --help
Traceback (most recent call last):
  File "/var/www/fittrackee/venv/bin/ftcli", line 5, in <module>
    from fittrackee.cli import cli
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/fittrackee/cli/__init__.py", line 3, in <module>
    from fittrackee.migrations.commands import db_cli
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/fittrackee/migrations/commands.py", line 9, in <module>
    from fittrackee.cli.app import app
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/fittrackee/cli/app.py", line 3, in <module>
    app = create_app(init_email=False)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/fittrackee/__init__.py", line 89, in create_app
    db.init_app(app)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/flask_sqlalchemy/extension.py", line 310, in init_app
    raise RuntimeError(
RuntimeError: Either 'SQLALCHEMY_DATABASE_URI' or 'SQLALCHEMY_BINDS' must be set.

There's missing instruction to set the necessary environment variables like

# export $(grep -v '^#' .env | xargs)
-bash: export: `<a': not a valid identifier
-bash: export: `noreferrer">OpenStreetMap</a>': not a valid identifier

which obviously is not perfect, but makes the command work.

Thovi98 commented 3 months ago

Could you please confirm that https://github.com/YunoHost-Apps/fittrackee_ynh/pull/69 solves this issue?