Project

General

Profile

Bug #38052

KeyError at /visualization/45/json/ (u'None', u"Grand Chamb\xe9ry Cours d'eaux")

Added by Thomas Noël 18 days ago. Updated 12 days ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
28 Nov 2019
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

Description

Je ne sais pas encore d'où ça vient exactement ; cf #38046 pour l'explication fonctionnelle.

From: root@bijoe.node1.test.saas.entrouvert.org
To: admin+bijoe.test@entrouvert.com
Subject: [statistiques-grand-chambery.test.entrouvert.org] ERROR (EXTERNAL IP): Internal Server Error: /visualization/45/json/

Internal Server Error: /visualization/45/json/

KeyError at /visualization/45/json/
(u'None', u"Grand Chamb\xe9ry Cours d'eaux")

Request Method: GET
Request URL: https://statistiques-grand-chambery.test.entrouvert.org/visualization/45/json/
Django Version: 1.11.20
Python Executable: /usr/bin/uwsgi-core
Python Version: 2.7.13
Python Path: ['.', '', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']
Server time: jeu, 28 Nov 2019 13:25:23 +0100
Installed Applications:
''
Installed Middleware:
''

Traceback:

File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
  466.             response = self.handle_exception(exc)

File "/usr/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
  463.             response = handler(request, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/bijoe/visualization/views.py" in get
  305.                     data.append([grid[(x, y)] for x in used_x_labels.keys()])

Exception Type: KeyError at /visualization/45/json/
Exception Value: (u'None', u"Grand Chamb\xe9ry Cours d'eaux")
Request information:
USER: AnonymousUser

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_CONNECTION = 'close'
HTTP_HOST = 'statistiques-grand-chambery.test.entrouvert.org'
HTTP_SENTRY_TRACE = '00-52871f4640dc46579981817b75975318-ab526fa1704265f5-00'
HTTP_USER_AGENT = 'python-requests/2.21.0'
HTTP_X_FORWARDED_FOR = '10.0.0.14, 10.0.0.14'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_FORWARDED_PROTOCOL = 'ssl'
HTTP_X_FORWARDED_SSL = 'on'
HTTP_X_PUBLIK_CLUSTER_BACKEND = 'bijoe-balancer'
HTTP_X_REAL_IP = '10.0.0.14'
PATH_INFO = u'/visualization/45/json/'
QUERY_STRING = ''
REMOTE_ADDR = '10.0.0.14'
REQUEST_METHOD = 'GET'
REQUEST_URI = '/visualization/45/json/'
SCRIPT_NAME = u''
SERVER_NAME = 'bijoe'
SERVER_PORT = '80'
SERVER_PROTOCOL = 'HTTP/1.0'
uwsgi.node = 'bijoe'
uwsgi.version = '2.0.14-debian'
wsgi.errors = <open file 'wsgi_errors', mode 'w' at 0x7f558aee8930>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7f55892b8ae0>
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = u'(1, 0)'

Settings:
Using settings module


Related issues

Duplicates BiJoe - Development #38067: Revoir complètement la génération des tableaux et la gestion des valeurs NULL dues aux OUTER JOIN Solution déployée 28 Nov 2019

History

#1 Updated by Thomas Noël 18 days ago

  • Tracker changed from Development to Bug

#4 Updated by Benjamin Dauvergne 18 days ago

Serghei Mihai a écrit :

Cela ressemble au problème qu'on avait à Villeurbanne

À vérifier mais je penserai plus à une combinaison de valeur qui n'existe jamais, en gros on fait un SELECT count(..) ... GROUP BY attribut1, attribut2 on met tout ça dans grid[(attribute1, attribute2)] d'un coté puis pour on fait deux listes axe_x et axe_y avec les valeurs d'attribut1 et attribut2 rencontrées, le produit cartésien de axe_x et axe_y n'est pas forcément couvert par les clés de grid.

Et donc faut juste mettre grid.get((x, y)).

#5 Updated by Benjamin Dauvergne 18 days ago

Bon ça rejoint le ticket de Nanterre #38031 je vais traiter les deux.

#6 Updated by Benjamin Dauvergne 12 days ago

  • Duplicates Development #38067: Revoir complètement la génération des tableaux et la gestion des valeurs NULL dues aux OUTER JOIN added

#7 Updated by Benjamin Dauvergne 12 days ago

  • Status changed from Nouveau to Fermé

C'est corrigé.

Also available in: Atom PDF