seahub icon indicating copy to clipboard operation
seahub copied to clipboard

pytz.exceptions.AmbiguousTimeError

Open LXGaming opened this issue 2 years ago • 1 comments

Environment:

  • Client v8.0.6 (Windows)
  • Server v9.0.4 (Docker)

The Seafile Windows client is currently failing with Failed to get libraries information, I found the following exception in the seahub.log file.

2022-04-03 02:54:50,766 [ERROR] django.request:224 log_response Internal Server Error: /api2/repos/
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/seafile/seafile-server-9.0.4/seahub/seahub/api2/base.py", line 23, in dispatch
    response = super(APIView, self).dispatch(*a, **kw)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/opt/seafile/seafile-server-9.0.4/seahub/seahub/api2/base.py", line 20, in handle_exception
    return super(APIView, self).handle_exception(exc)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/seafile/seafile-server-9.0.4/seahub/seahub/api2/views.py", line 754, in get
    "mtime_relative": translate_seahub_time(r.last_modify),
  File "/opt/seafile/seafile-server-9.0.4/seahub/seahub/base/templatetags/seahub_tags.py", line 296, in translate_seahub_time
    titletime = DateFormat(val).format('r')
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/dateformat.py", line 42, in format
    pieces.append(str(getattr(self, piece)()))
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/dateformat.py", line 274, in r
    dt = make_aware(self.data, timezone=self.timezone)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/timezone.py", line 239, in make_aware
    return timezone.localize(value, is_dst=is_dst)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/pytz/tzinfo.py", line 363, in localize
    raise AmbiguousTimeError(dt)
pytz.exceptions.AmbiguousTimeError: 2022-04-03 02:11:58

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/deprecation.py", line 117, in __call__
    response = response or self.get_response(request)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/handlers/exception.py", line 49, in inner
    response = response_for_exception(request, exc)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/handlers/exception.py", line 115, in response_for_exception
    log_response(
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/log.py", line 224, in log_response
    getattr(logger, level)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1475, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
    self.emit(record)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/log.py", line 120, in emit
    message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text())
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/views/debug.py", line 353, in get_traceback_text
    return t.render(c)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 170, in render
    return self._render(context)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 162, in _render
    return self.nodelist.render(context)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 988, in render
    output = self.filter_expression.resolve(context)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/base.py", line 698, in resolve
    new_obj = func(obj, *arg_vals)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/template/defaultfilters.py", line 717, in date
    return formats.date_format(value, arg)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/formats.py", line 152, in date_format
    return dateformat.format(value, get_format(format or 'DATE_FORMAT', use_l10n=use_l10n))
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/dateformat.py", line 327, in format
    return df.format(format_string)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/dateformat.py", line 42, in format
    pieces.append(str(getattr(self, piece)()))
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/dateformat.py", line 274, in r
    dt = make_aware(self.data, timezone=self.timezone)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/django/utils/timezone.py", line 239, in make_aware
    return timezone.localize(value, is_dst=is_dst)
  File "/opt/seafile/seafile-server-9.0.4/seahub/thirdpart/pytz/tzinfo.py", line 363, in localize
    raise AmbiguousTimeError(dt)
pytz.exceptions.AmbiguousTimeError: 2022-04-03 02:54:50.765396

LXGaming avatar Apr 02 '22 14:04 LXGaming