Skip to content

[BUG] postorius image is missing tzdata package #602

@Skyr

Description

@Skyr

**Tag/version of Container Image: maxking/postorius:0.4 **

Accessing the site results in a 500 error; uwsgi-error.log contains the stacktrace:


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 131, in __call__
    response = self.get_response(request)
  File "/usr/lib/python3.10/site-packages/django/core/handlers/base.py", line 143, in get_response
    log_response(
  File "/usr/lib/python3.10/site-packages/django/utils/log.py", line 241, in log_response
    getattr(logger, level)(
  File "/usr/lib/python3.10/logging/__init__.py", line 1506, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.10/logging/__init__.py", line 1624, in _log
    self.handle(record)
  File "/usr/lib/python3.10/logging/__init__.py", line 1634, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.10/logging/__init__.py", line 968, in handle
    self.emit(record)
  File "/usr/lib/python3.10/site-packages/django/utils/log.py", line 125, in emit
    reporter.get_traceback_text(),
  File "/usr/lib/python3.10/site-packages/django/views/debug.py", line 404, in get_traceback_text
    return t.render(c)
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 175, in render
    return self._render(context)
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 1064, in render
    output = self.filter_expression.resolve(context)
  File "/usr/lib/python3.10/site-packages/django/template/base.py", line 738, in resolve
    obj = template_localtime(obj, context.use_tz)
  File "/usr/lib/python3.10/site-packages/django/utils/timezone.py", line 196, in template_localtime
    return localtime(value) if should_convert else value
  File "/usr/lib/python3.10/site-packages/django/utils/timezone.py", line 215, in localtime
    timezone = get_current_timezone()
  File "/usr/lib/python3.10/site-packages/django/utils/timezone.py", line 96, in get_current_timezone
    return getattr(_active, "value", get_default_timezone())
  File "/usr/lib/python3.10/site-packages/django/utils/timezone.py", line 82, in get_default_timezone
    return zoneinfo.ZoneInfo(settings.TIME_ZONE)
  File "/usr/lib/python3.10/zoneinfo/_common.py", line 24, in load_tzdata
    raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key UTC'

Manually entering the container and running docker exec -it mailman-postorius pip install tzdata (and then restarting the container) fixes the problem (until the container is recreated...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions