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

Upgrade from 5.0.2 to 5.2 fails #2072

Closed
2 tasks done
pleunv opened this issue Nov 22, 2023 · 3 comments
Closed
2 tasks done

Upgrade from 5.0.2 to 5.2 fails #2072

pleunv opened this issue Nov 22, 2023 · 3 comments
Labels
bug Something is broken.

Comments

@pleunv
Copy link

pleunv commented Nov 22, 2023

Describe the issue

When upgrading the docker image from 5.0.2 (I'm certain it was running on 5.0.2) to 5.2 I'm running into the following issue:

Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  Applying trans.0003_alter_project_access_control... OK
  Applying trans.0004_alter_change_action... OK
  Applying trans.0005_alter_change_alert_alter_change_announcement_and_more... OK
  Applying trans.0006_alter_change_action... OK
  Applying accounts.0002_new_string_notification... OK
  Applying accounts.0003_alter_auditlog_activity... OK
  Applying accounts.0004_alter_profile_twitter... OK
  Applying trans.0007_alter_change_action... OK
  Applying trans.0008_workflowsetting... OK
[2023-11-22 08:02:52,643: INFO/68] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:02:59,345: WARNING/110] Handled exception: KeyError: 'unapproved_words'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved_words'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:03:16,263: INFO/70] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:03:23,001: WARNING/111] Handled exception: KeyError: 'total_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'total_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:03:39,885: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:03:46,766: WARNING/110] Handled exception: KeyError: 'unapproved'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:04:03,599: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:04:10,328: WARNING/110] Handled exception: KeyError: 'unapproved_words'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved_words'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:04:27,153: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:04:33,963: WARNING/110] Handled exception: KeyError: 'monthly_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'monthly_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:04:50,885: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:04:57,746: WARNING/110] Handled exception: KeyError: 'unapproved_chars'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved_chars'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:05:14,663: INFO/68] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:05:21,304: WARNING/109] Handled exception: KeyError: 'unapproved_words'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved_words'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:05:37,887: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:05:44,548: WARNING/110] Handled exception: KeyError: 'unapproved'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:06:01,189: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:06:07,816: WARNING/110] Handled exception: KeyError: 'monthly_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'monthly_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:06:24,697: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:06:31,435: WARNING/110] Handled exception: KeyError: 'total_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'total_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:06:47,915: INFO/68] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:06:54,738: WARNING/109] Handled exception: KeyError: 'recent_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'recent_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:07:11,521: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:07:18,260: WARNING/110] Handled exception: KeyError: 'monthly_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'monthly_changes'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:07:34,968: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:07:41,713: WARNING/110] Handled exception: KeyError: 'unapproved_chars'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'unapproved_chars'
Starting...
System check identified no issues (1 silenced).
Postgres 150005 is up
Starting database migration...
Operations to perform:
  Apply all migrations: accounts, addons, admin, auth, authtoken, checks, configuration, contenttypes, django_celery_beat, fonts, gitexport, glossary, lang, memory, metrics, screenshots, sessions, social_django, trans, utils, vcs, weblate_auth, wladmin
Running migrations:
  No migrations to apply.
[2023-11-22 08:07:58,326: INFO/69] Acquired Lock('lock:lock:gitlock').
CommandError: User exists, specify --update to update existing
Refreshing stats...
[2023-11-22 08:08:05,141: WARNING/110] Handled exception: KeyError: 'recent_changes'
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/runner.py", line 19, in main
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/base.py", line 27, in execute
    return super().execute(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/management/commands/ensure_stats.py", line 18, in handle
    all_strings = GlobalStats().all
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 237, in __getattr__
    self.calculate_by_name(name)
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 248, in calculate_by_name
    self.calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 311, in calculate_basic
    self._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 1220, in _calculate_basic
    super()._calculate_basic()
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 805, in _calculate_basic
    stats[item] = sum(values)
                  ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 788, in <genexpr>
    values = (stats_obj.aggregate_get(item) for stats_obj in all_stats)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/weblate/utils/stats.py", line 211, in aggregate_get
    return self._data[name]
           ~~~~~~~~~~^^^^^^
KeyError: 'recent_changes'

Not really sure what's going on as an upgrade from 5.0.2 should work according to the docs.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  • Took down a functional Weblate 5.0.2 container
  • Updated the container to the latest version
  • Attempted to restart the container again

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

Additional context

No response

@nijel nijel added the bug Something is broken. label Nov 22, 2023
@nijel
Copy link
Member

nijel commented Nov 22, 2023

Duplicate of WeblateOrg/weblate#10439

@nijel nijel marked this as a duplicate of WeblateOrg/weblate#10439 Nov 22, 2023
@nijel nijel closed this as completed Nov 22, 2023
@pleunv
Copy link
Author

pleunv commented Nov 22, 2023

Apologies... Missed that one in a search.

I just reverted to 5.0.2, first upgraded to 5.1.1 and then to 5.2 and now everything is working fine. Not sure if this is expected, but I'm not complaining :)

edit: actually no, while the initial startup works, I still run into the exception at runtime. Had to revert back to 5.1.1 for now.

Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

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

No branches or pull requests

2 participants