[GH-ISSUE #1258] Upgade from 3.11 to 4.0: "Cannot resolve keyword 'n_pings' into field." #848

Closed
opened 2026-02-25 23:43:47 +03:00 by kerem · 2 comments
Owner

Originally created by @mathieumd on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1258

I upgraded from 3.11 to 4.0, and since then, each ping received get a server error 500:

janv. 26 11:37:24 healthchecks01 python[598251]: Traceback (most recent call last):
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
janv. 26 11:37:24 healthchecks01 python[598251]:     response = get_response(request)
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
janv. 26 11:37:24 healthchecks01 python[598251]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper
janv. 26 11:37:24 healthchecks01 python[598251]:     return view_func(request, *args, **kwargs)
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/views/decorators/cache.py", line 80, in _view_wrapper
janv. 26 11:37:24 healthchecks01 python[598251]:     response = view_func(request, *args, **kwargs)
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/healthchecks-4.0/hc/api/views.py", line 237, in ping
janv. 26 11:37:24 healthchecks01 python[598251]:     check.ping(remote_addr, scheme, method, ua, body, action, rid, exitstatus)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/healthchecks-4.0/hc/api/models.py", line 542, in ping
janv. 26 11:37:24 healthchecks01 python[598251]:     ping.save()
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 902, in save
janv. 26 11:37:24 healthchecks01 python[598251]:     self.save_base(
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1008, in save_base
janv. 26 11:37:24 healthchecks01 python[598251]:     updated = self._save_table(
janv. 26 11:37:24 healthchecks01 python[598251]:               ^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1169, in _save_table
janv. 26 11:37:24 healthchecks01 python[598251]:     results = self._do_insert(
janv. 26 11:37:24 healthchecks01 python[598251]:               ^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1210, in _do_insert
janv. 26 11:37:24 healthchecks01 python[598251]:     return manager._insert(
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
janv. 26 11:37:24 healthchecks01 python[598251]:     return getattr(self.get_queryset(), name)(*args, **kwargs)
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/query.py", line 1864, in _insert
janv. 26 11:37:24 healthchecks01 python[598251]:     return query.get_compiler(using=using).execute_sql(returning_fields)
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1881, in execute_sql
janv. 26 11:37:24 healthchecks01 python[598251]:     for sql, params in self.as_sql():
janv. 26 11:37:24 healthchecks01 python[598251]:                        ^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1806, in as_sql
janv. 26 11:37:24 healthchecks01 python[598251]:     self.prepare_value(field, self.pre_save_val(field, obj))
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1720, in prepare_value
janv. 26 11:37:24 healthchecks01 python[598251]:     value = value.resolve_expression(
janv. 26 11:37:24 healthchecks01 python[598251]:             ^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 775, in resolve_expression
janv. 26 11:37:24 healthchecks01 python[598251]:     resolved = super().resolve_expression(
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 300, in resolve_expression
janv. 26 11:37:24 healthchecks01 python[598251]:     expr.resolve_expression(query, allow_joins, reuse, summarize)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 902, in resolve_expression
janv. 26 11:37:24 healthchecks01 python[598251]:     return query.resolve_ref(self.name, allow_joins, reuse, summarize)
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 2046, in resolve_ref
janv. 26 11:37:24 healthchecks01 python[598251]:     join_info = self.setup_joins(
janv. 26 11:37:24 healthchecks01 python[598251]:                 ^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 1897, in setup_joins
janv. 26 11:37:24 healthchecks01 python[598251]:     path, final_field, targets, rest = self.names_to_path(
janv. 26 11:37:24 healthchecks01 python[598251]:                                        ^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 1802, in names_to_path
janv. 26 11:37:24 healthchecks01 python[598251]:     raise FieldError(
janv. 26 11:37:24 healthchecks01 python[598251]: django.core.exceptions.FieldError: Cannot resolve keyword 'n_pings' into field. Choices are: body_raw, created, exitstatus, id, kind, method, n, object_size, owner, owner_id, remote_addr, rid, scheme, ua
janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred:
janv. 26 11:37:24 healthchecks01 python[598251]: Traceback (most recent call last):
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
janv. 26 11:37:24 healthchecks01 python[598251]:     response = get_response(request)
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/healthchecks-4.0/hc/accounts/middleware.py", line 21, in __call__
janv. 26 11:37:24 healthchecks01 python[598251]:     return self.get_response(request)
janv. 26 11:37:24 healthchecks01 python[598251]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 57, in inner
janv. 26 11:37:24 healthchecks01 python[598251]:     response = response_for_exception(request, exc)
janv. 26 11:37:24 healthchecks01 python[598251]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 143, in response_for_exception
janv. 26 11:37:24 healthchecks01 python[598251]:     log_response(
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 248, in log_response
janv. 26 11:37:24 healthchecks01 python[598251]:     getattr(logger, level)(
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/usr/lib/python3.12/logging/__init__.py", line 1568, in error
janv. 26 11:37:24 healthchecks01 python[598251]:     self._log(ERROR, msg, args, **kwargs)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/usr/lib/python3.12/logging/__init__.py", line 1684, in _log
janv. 26 11:37:24 healthchecks01 python[598251]:     self.handle(record)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/usr/lib/python3.12/logging/__init__.py", line 1700, in handle
janv. 26 11:37:24 healthchecks01 python[598251]:     self.callHandlers(record)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/usr/lib/python3.12/logging/__init__.py", line 1762, in callHandlers
janv. 26 11:37:24 healthchecks01 python[598251]:     hdlr.handle(record)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/usr/lib/python3.12/logging/__init__.py", line 1028, in handle
janv. 26 11:37:24 healthchecks01 python[598251]:     self.emit(record)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 135, in emit
janv. 26 11:37:24 healthchecks01 python[598251]:     self.send_mail(subject, message, fail_silently=True, html_message=html_message)
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 138, in send_mail
janv. 26 11:37:24 healthchecks01 python[598251]:     mail.mail_admins(
janv. 26 11:37:24 healthchecks01 python[598251]:   File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/mail/__init__.py", line 129, in mail_admins
janv. 26 11:37:24 healthchecks01 python[598251]:     raise ValueError("The ADMINS setting must be a list of 2-tuples.")
janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples.
janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred:
...
janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples.
janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred:
...
janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples.
...

Looks like there are two problems:

  1. django.core.exceptions.FieldError: Cannot resolve keyword 'n_pings' into field. Choices are: body_raw, created, exitstatus, id, kind, method, n, object_size, owner, owner_id, remote_addr, rid, scheme, ua
  2. ValueError: The ADMINS setting must be a list of 2-tuples. (which loops a few times)

The first, n_pings, is the main one. I don't understand, because I did run migrations:

sudo -u healthchecks /opt/healthchecks/venv/bin/python /opt/healthchecks/healthchecks/manage.py showmigrations |egrep -v '(\[X]|^[a-z])'
System check identified some issues:

WARNINGS:
?: (hc.api.W002) settings.EMAIL_HOST is not set, cannot send email
        HINT: See https://github.com/healthchecks/healthchecks#sending-emails
 (no migrations)

However, EMAIL_HOST is set in the environment. Just like for the second problem, ADMINS. Both are set as an environmental variable by Systemd from .env file. They are well defined in process environment:

sudo cat /proc/598251/environ |egrep -oa '(EMAIL_HOST|ADMINS)=[^A-Z]*'
ADMINS=root@example.com
EMAIL_HOST=localhost

Did I missed something for the upgrade?

Originally created by @mathieumd on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1258 I upgraded from 3.11 to 4.0, and since then, each ping received get a server error 500: ``` janv. 26 11:37:24 healthchecks01 python[598251]: Traceback (most recent call last): janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner janv. 26 11:37:24 healthchecks01 python[598251]: response = get_response(request) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response janv. 26 11:37:24 healthchecks01 python[598251]: response = wrapped_callback(request, *callback_args, **callback_kwargs) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper janv. 26 11:37:24 healthchecks01 python[598251]: return view_func(request, *args, **kwargs) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/views/decorators/cache.py", line 80, in _view_wrapper janv. 26 11:37:24 healthchecks01 python[598251]: response = view_func(request, *args, **kwargs) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/healthchecks-4.0/hc/api/views.py", line 237, in ping janv. 26 11:37:24 healthchecks01 python[598251]: check.ping(remote_addr, scheme, method, ua, body, action, rid, exitstatus) janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/healthchecks-4.0/hc/api/models.py", line 542, in ping janv. 26 11:37:24 healthchecks01 python[598251]: ping.save() janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 902, in save janv. 26 11:37:24 healthchecks01 python[598251]: self.save_base( janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1008, in save_base janv. 26 11:37:24 healthchecks01 python[598251]: updated = self._save_table( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1169, in _save_table janv. 26 11:37:24 healthchecks01 python[598251]: results = self._do_insert( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1210, in _do_insert janv. 26 11:37:24 healthchecks01 python[598251]: return manager._insert( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method janv. 26 11:37:24 healthchecks01 python[598251]: return getattr(self.get_queryset(), name)(*args, **kwargs) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/query.py", line 1864, in _insert janv. 26 11:37:24 healthchecks01 python[598251]: return query.get_compiler(using=using).execute_sql(returning_fields) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1881, in execute_sql janv. 26 11:37:24 healthchecks01 python[598251]: for sql, params in self.as_sql(): janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1806, in as_sql janv. 26 11:37:24 healthchecks01 python[598251]: self.prepare_value(field, self.pre_save_val(field, obj)) janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1720, in prepare_value janv. 26 11:37:24 healthchecks01 python[598251]: value = value.resolve_expression( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 775, in resolve_expression janv. 26 11:37:24 healthchecks01 python[598251]: resolved = super().resolve_expression( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 300, in resolve_expression janv. 26 11:37:24 healthchecks01 python[598251]: expr.resolve_expression(query, allow_joins, reuse, summarize) janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/expressions.py", line 902, in resolve_expression janv. 26 11:37:24 healthchecks01 python[598251]: return query.resolve_ref(self.name, allow_joins, reuse, summarize) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 2046, in resolve_ref janv. 26 11:37:24 healthchecks01 python[598251]: join_info = self.setup_joins( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 1897, in setup_joins janv. 26 11:37:24 healthchecks01 python[598251]: path, final_field, targets, rest = self.names_to_path( janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/db/models/sql/query.py", line 1802, in names_to_path janv. 26 11:37:24 healthchecks01 python[598251]: raise FieldError( janv. 26 11:37:24 healthchecks01 python[598251]: django.core.exceptions.FieldError: Cannot resolve keyword 'n_pings' into field. Choices are: body_raw, created, exitstatus, id, kind, method, n, object_size, owner, owner_id, remote_addr, rid, scheme, ua janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred: janv. 26 11:37:24 healthchecks01 python[598251]: Traceback (most recent call last): janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner janv. 26 11:37:24 healthchecks01 python[598251]: response = get_response(request) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/healthchecks-4.0/hc/accounts/middleware.py", line 21, in __call__ janv. 26 11:37:24 healthchecks01 python[598251]: return self.get_response(request) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 57, in inner janv. 26 11:37:24 healthchecks01 python[598251]: response = response_for_exception(request, exc) janv. 26 11:37:24 healthchecks01 python[598251]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 143, in response_for_exception janv. 26 11:37:24 healthchecks01 python[598251]: log_response( janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 248, in log_response janv. 26 11:37:24 healthchecks01 python[598251]: getattr(logger, level)( janv. 26 11:37:24 healthchecks01 python[598251]: File "/usr/lib/python3.12/logging/__init__.py", line 1568, in error janv. 26 11:37:24 healthchecks01 python[598251]: self._log(ERROR, msg, args, **kwargs) janv. 26 11:37:24 healthchecks01 python[598251]: File "/usr/lib/python3.12/logging/__init__.py", line 1684, in _log janv. 26 11:37:24 healthchecks01 python[598251]: self.handle(record) janv. 26 11:37:24 healthchecks01 python[598251]: File "/usr/lib/python3.12/logging/__init__.py", line 1700, in handle janv. 26 11:37:24 healthchecks01 python[598251]: self.callHandlers(record) janv. 26 11:37:24 healthchecks01 python[598251]: File "/usr/lib/python3.12/logging/__init__.py", line 1762, in callHandlers janv. 26 11:37:24 healthchecks01 python[598251]: hdlr.handle(record) janv. 26 11:37:24 healthchecks01 python[598251]: File "/usr/lib/python3.12/logging/__init__.py", line 1028, in handle janv. 26 11:37:24 healthchecks01 python[598251]: self.emit(record) janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 135, in emit janv. 26 11:37:24 healthchecks01 python[598251]: self.send_mail(subject, message, fail_silently=True, html_message=html_message) janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/utils/log.py", line 138, in send_mail janv. 26 11:37:24 healthchecks01 python[598251]: mail.mail_admins( janv. 26 11:37:24 healthchecks01 python[598251]: File "/opt/healthchecks/venv/lib/python3.12/site-packages/django/core/mail/__init__.py", line 129, in mail_admins janv. 26 11:37:24 healthchecks01 python[598251]: raise ValueError("The ADMINS setting must be a list of 2-tuples.") janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples. janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred: ... janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples. janv. 26 11:37:24 healthchecks01 python[598251]: During handling of the above exception, another exception occurred: ... janv. 26 11:37:24 healthchecks01 python[598251]: ValueError: The ADMINS setting must be a list of 2-tuples. ... ``` Looks like there are two problems: 1. `django.core.exceptions.FieldError: Cannot resolve keyword 'n_pings' into field. Choices are: body_raw, created, exitstatus, id, kind, method, n, object_size, owner, owner_id, remote_addr, rid, scheme, ua` 2. `ValueError: The ADMINS setting must be a list of 2-tuples.` (which loops a few times) The first, `n_pings`, is the main one. I don't understand, because I did run migrations: ```sh sudo -u healthchecks /opt/healthchecks/venv/bin/python /opt/healthchecks/healthchecks/manage.py showmigrations |egrep -v '(\[X]|^[a-z])' System check identified some issues: WARNINGS: ?: (hc.api.W002) settings.EMAIL_HOST is not set, cannot send email HINT: See https://github.com/healthchecks/healthchecks#sending-emails (no migrations) ``` However, `EMAIL_HOST` is set in the environment. Just like for the second problem, `ADMINS`. Both are set as an environmental variable by Systemd from `.env` file. They are well defined in process environment: ```sh sudo cat /proc/598251/environ |egrep -oa '(EMAIL_HOST|ADMINS)=[^A-Z]*' ADMINS=root@example.com EMAIL_HOST=localhost ``` Did I missed something for the upgrade?
kerem closed this issue 2026-02-25 23:43:48 +03:00
Author
Owner

@cuu508 commented on GitHub (Jan 26, 2026):

The The ADMINS setting must be a list of 2-tuples. error makes me think you don't have the correct version of Django installed. Did you install the dependencies listed in requirements.txt?

<!-- gh-comment-id:3799046624 --> @cuu508 commented on GitHub (Jan 26, 2026): The `The ADMINS setting must be a list of 2-tuples.` error makes me think you don't have the correct version of Django installed. Did you install the dependencies listed in requirements.txt?
Author
Owner

@mathieumd commented on GitHub (Jan 26, 2026):

Thank you very much!
Indeed, I completely missed out this step.
Sorry for wasting you time!

<!-- gh-comment-id:3799167880 --> @mathieumd commented on GitHub (Jan 26, 2026): Thank you very much! Indeed, I completely missed out this step. Sorry for wasting you time!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#848
No description provided.