Bug #24353
erreur d'encodage des logs sur les statuts comportant des accents
Statut:
Rejeté
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
07 juin 2018
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Description
Arrivé en prod:
<pre> Exception: type = '<type 'exceptions.UnicodeDecodeError'>', value = ''ascii' codec can't decode byte 0xc3 in position 99: ordinal not in range(128)' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/django/utils/log.py", line 115, in emit 113 subject = '%s: %s' % ( 114 record.levelname, > 115 record.getMessage() 116 ) 117 request = None locals: record = <logging.LogRecord object at 0x7f0f004c2b90> request = <WSGIRequest: GET '/backoffice/workflows/91/'> self = <django.utils.log.AdminEmailHandler object at 0x7f0f0ab69c90> File "/usr/lib/python2.7/logging/__init__.py", line 759, in handle 757 self.emit(record) 758 finally: > 759 self.release() 760 return rv 761 locals: record = <logging.LogRecord object at 0x7f0f004c2b90> rv = 1 self = <django.utils.log.AdminEmailHandler object at 0x7f0f0ab69c90> File "/usr/lib/python2.7/logging/__init__.py", line 1329, in callHandlers 1327 found = found + 1 1328 if record.levelno >= hdlr.level: > 1329 hdlr.handle(record) 1330 if not c.propagate: 1331 c = None #break out locals: c = <logging.RootLogger object at 0x7f0f0dfa4ad0> found = 3 hdlr = <django.utils.log.AdminEmailHandler object at 0x7f0f0ab69c90> record = <logging.LogRecord object at 0x7f0f004c2b90> self = <logging.Logger object at 0x7f0f0092e690> File "/usr/lib/python2.7/logging/__init__.py", line 1289, in handle 1287 """ 1288 if (not self.disabled) and self.filter(record): > 1289 self.callHandlers(record) 1290 1291 def addHandler(self, hdlr): locals: record = <logging.LogRecord object at 0x7f0f004c2b90> self = <logging.Logger object at 0x7f0f0092e690> File "/usr/lib/python2.7/logging/__init__.py", line 1279, in _log 1277 exc_info = sys.exc_info() 1278 record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) > 1279 self.handle(record) 1280 1281 def handle(self, record): locals: args = () exc_info = None extra = None fn = '/usr/lib/python2.7/dist-packages/wcs/wf/wscall.py' func = 'get_target_status' level = 40 lno = 421 msg = "reference to invalid status in workflow Base nautique - Passeport voile, status Report de l'activit\xc3\xa9, item Webservice" record = <logging.LogRecord object at 0x7f0f004c2b90> self = <logging.Logger object at 0x7f0f0092e690> File "/usr/lib/python2.7/logging/__init__.py", line 1186, in error 1184 """ 1185 if self.isEnabledFor(ERROR): > 1186 self._log(ERROR, msg, args, **kwargs) 1187 1188 def exception(self, msg, *args, **kwargs): locals: args = () kwargs = {} msg = "reference to invalid status in workflow Base nautique - Passeport voile, status Report de l'activit\xc3\xa9, item Webservice" self = <logging.Logger object at 0x7f0f0092e690> File "/usr/lib/python2.7/dist-packages/wcs/wf/wscall.py", line 421, in get_target_status 419 self.parent.parent.name, 420 self.parent.name, > 421 self.description)) 422 continue 423 targets.append(target) locals: attribute = 'action_on_app_error' self = <wcs.wf.wscall.WebserviceCallStatusItem object at 0x7f0ef86f3310> targets = [] value = '43' File "/usr/lib/python2.7/dist-packages/wcs/admin/workflows.py", line 155, in graphviz 153 i = status.id 154 for item in status.items: > 155 next_status_ids = [x.id for x in item.get_target_status() 156 if x.id and x.id != status.id] 157 if not next_status_ids: locals: colours = {'FF9900': 'lightgoldenrodyellow', '669900': 'lightblue', '996666': 'lemonchiffon', '99FFFF': 'lightgrey', 'FFFF00': 'lightgray', '00FF00': 'lightcyan', 'FFFFFF': 'lightpink', 'FFFF99': 'lightgreen', 'FF6666': 'lightcoral'} done = {'10': True} graphviz_colours = ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'grey', 'green', 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen'] i = '17' include = True item = <wcs.wf.wscall.WebserviceCallStatusItem object at 0x7f0ef86f3310> label = 'Saut automatique\\n(Annulation de\\ncommande)' next_id = '10' next_status_ids = ['10'] out = <cStringIO.StringO object at 0x7f0efbf9f618> revert_colours = {'lightgray': 'FFFF00', 'lightblue': '669900', 'lightcyan': '00FF00', 'lightgoldenrodyellow': 'FF9900', 'lightgrey': '99FFFF', 'lemonchiffon': '996666', 'lightgreen': 'FFFF99', 'lightpink': 'FFFFFF', 'lightcoral': 'FF6666'} select = None status = <wcs.workflows.WorkflowStatus object at 0x7f0ef86f3890> svg = True url = 'status/37/items/2/' url_prefix = '' workflow = <Workflow 'Base nautique - Passeport voile' id:91> x = <wcs.workflows.WorkflowStatus object at 0x7f0ef86f3490> File "/usr/lib/python2.7/dist-packages/wcs/admin/workflows.py", line 1504, in _q_index 1502 if self.workflow.possible_status: 1503 r += htmltext('<div class="bo-block">') > 1504 r += htmltext(graphviz(self.workflow, include=True)) 1505 r += htmltext('<div class="full-screen-link"><a href="svg">%s</a></div>') % _('Full Screen') 1506 r += htmltext('</div>') # bo-block </pre>
Demandes liées
Historique
Mis à jour par Frédéric Péters il y a presque 6 ans
- Lié à Bug #24245: crash sur log de l'info sur un statut inconnu ajouté