Project

General

Profile

Bug #84096

Page récapitulaitve des rôles : JSONDecodeError

Added by Emmanuel Cazenave 3 months ago. Updated about 2 months ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
30 November 2023
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/117174/?query=is%3Aunresolved%20JSONDecodeError

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  File "django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/clickjacking.py", line 15, in wrapped_view
    resp = view_func(*args, **kwargs)
  File "authentic2/manager/utils.py", line 65, in _wrapped_view
    return func(request, *args, **kwargs)
  File "django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "django/views/generic/detail.py", line 107, in get
    context = self.get_context_data(object=self.object)
  File "authentic2/manager/role_views.py", line 860, in get_context_data
    summary_data = get_roles_summary_cache().get(self.context.uuid, {})
  File "authentic2/role_summary.py", line 113, in get_roles_summary_cache
    return json.load(fd)
  File "__init__.py", line 293, in load
    return loads(fp.read(),
  File "__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

Associated revisions

Revision e6feec46 (diff)
Added by Benjamin Dauvergne about 2 months ago

misc: improve error handling when reading/writing roles summary cache (#84096)

  • use atomicwriter to replace existing cache
  • in case of failure to read or write the new cache, log the error and
    report the problem in the web interface.

History

#2

Updated by Benjamin Dauvergne 3 months ago

Soit on essaie de lire pendant l'écriture soit il y a eu foirage à l'écriture, appelons notre ami AtomicWriter à la rescousse.

#3

Updated by Benjamin Dauvergne 3 months ago

  • Assignee set to Benjamin Dauvergne
#4

Updated by Robot Gitea 3 months ago

  • Status changed from Nouveau to Solution proposée

Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :

#6

Updated by Robot Gitea about 2 months ago

  • Status changed from Solution proposée to Solution validée

Paul Marillonnet (pmarillonnet) a approuvé une pull request sur Gitea concernant cette demande :

#7

Updated by Robot Gitea about 2 months ago

  • Status changed from Solution validée to Résolu (à déployer)

Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :

#8

Updated by Transition automatique about 2 months ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF