Hi,
Not a very good response.
(venv) mailman@new-server ~ (v3.3.9) [0|1]> mailman-web check postorius Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 158, in get_app_config return self.app_configs[app_label] KeyError: 'postorius'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/check.py", line 56, in handle app_configs = [apps.get_app_config(app_label) for app_label in app_labels] File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/check.py", line 56, in <listcomp> app_configs = [apps.get_app_config(app_label) for app_label in app_labels] File "/local/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 165, in get_app_config raise LookupError(message) LookupError: No installed app with label 'postorius'. (venv) mailman@new-server ~ (v3.3.9) [0|1]> mailman-web check hyperkitty Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 158, in get_app_config return self.app_configs[app_label] KeyError: 'hyperkitty'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/check.py", line 56, in handle app_configs = [apps.get_app_config(app_label) for app_label in app_labels] File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/check.py", line 56, in <listcomp> app_configs = [apps.get_app_config(app_label) for app_label in app_labels] File "/local/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 165, in get_app_config raise LookupError(message) LookupError: No installed app with label 'hyperkitty'. (venv) mailman@new-server ~ (v3.3.9) [0|1]> mailman-web migrate -h usage: mailman-web migrate [-h] [--noinput] [--database DATABASE] [--fake] [--fake-initial] [--plan] [--run-syncdb] [--check] [--prune] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] [--skip-checks] [app_label] [migration_name]
Updates database schema. Manages both apps with migrations and those without.
positional arguments: app_label App label of an application to synchronize the state. migration_name Database state will be brought to the state after that migration. Use the name "zero" to unapply all migrations.
options: -h, --help show this help message and exit --noinput, --no-input Tells Django to NOT prompt the user for input of any kind. --database DATABASE Nominates a database to synchronize. Defaults to the "default" database. --fake Mark migrations as run without actually running them. --fake-initial Detect if tables already exist and fake-apply initial migrations if so. Make sure that the current database schema matches your initial migration before using this flag. Django will only check for an existing table name. --plan Shows a list of the migration actions that will be performed. --run-syncdb Creates tables for apps without migrations. --check Exits with a non-zero status if unapplied migrations exist. --prune Delete nonexistent migrations from the django_migrations table. --version Show program's version number and exit. -v {0,1,2,3}, --verbosity {0,1,2,3} Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output --settings SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath PYTHONPATH A directory to add to the Python path, e.g. "/home/djangoprojects/myproject". --traceback Raise on CommandError exceptions. --no-color Don't colorize the command output. --force-color Force colorization of the command output. --skip-checks Skip system checks.
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Sun, 17 Dec 2023 at 04:15, Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Helio Loureiro writes:
Well... not that good. Now it is mailman3-web that doesn't work.
(venv) mailman@new-machine ~ (v3.3.9)> mailman-web check System check identified no issues (0 silenced). (venv) mailman@new-machine ~ (v3.3.9)> mailman-web check migrate Traceback (most recent call last): [omitted] LookupError: No installed app with label 'migrate'.
Any idea why migrate isn't working and saying it is installed?
Management commands aren't applications, so they wouldn't be valid arguments to "mailman-web check" in any case. Try "mailman-web check postorius" or "mailman-web check hyperkitty" to see how the application argument works. You should get the report "System check identified no issues (0 silenced)." as above.
Then try "mailman-web migrate -h". If that returns help output, the migrate command is installed and can be run (the help string is part of the migrate module, not part of mailman-web itself).
Why do you think "mailman-web migrate" isn't working? Most likely "migrate" is working as designed, but it is doing nothing because something about the way you transported the database originally caused mailman-web to think its database schema is up-to-date even though it is not (as happened with the mailman database).
Unfortunately this database is managed by Django, not by Alembic, and I don't know offhand how to discover and tell Django the actual schema version and then ask it to run any new migrations.
Steve