Tâche #17045
Scénario #16962: Traitement express MEN (36-38)
L'envoi de message dans la console fait une erreur d'unicode
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Start date:
09/06/2016
Due date:
% Done:
100%
Estimated time:
3.00 h
Remaining (hours):
0.0
Description
root@scribe:~# . /usr/lib/eole/zephir.sh root@scribe:~# Zephir "MSG" "Service z_stats arreté : redémarrage" "ZEPHIR" Traceback (most recent call last): File "/usr/lib/python2.7/logging/handlers.py", line 845, in emit msg = self.format(record) + '\000' File "/usr/lib/python2.7/logging/__init__.py", line 734, in format return fmt.format(record) File "/usr/lib/python2.7/logging/__init__.py", line 476, in format raise e UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128) Logged from file fonctionseole.py, line 182 root@scribe:~#
Il y a le même type d'erreur en 2.5.2.
Si on remplace dans /usr/share/zephir/scripts/Zephir.py :
etat = sys.argv[1] msg = sys.argv[2]
par
etat = unicode(sys.argv[1], 'utf-8') msg = unicode(sys.argv[2], 'utf-8')
Cela semble mieux fonctionner.
Associated revisions
pas d'erreur unicode lors de l'envoi de message à Zéphir (ref #16857 @1h)
History
#1 Updated by Scrum Master over 6 years ago
- Status changed from Nouveau to En cours
#2 Updated by Scrum Master over 6 years ago
- Assigned To set to Emmanuel GARETTE
#3 Updated by Emmanuel GARETTE over 6 years ago
- Remaining (hours) changed from 3.0 to 0.25
#4 Updated by Emmanuel GARETTE over 6 years ago
Commit fait en 2.4.0, mergé que dans master.
#5 Updated by Emmanuel GARETTE over 6 years ago
- % Done changed from 0 to 100
#6 Updated by Scrum Master over 6 years ago
- Status changed from En cours to Résolu
#7 Updated by Laurent Flori over 6 years ago
La correction est faite dans creole dans la résolution suivante:
#8 Updated by Laurent Flori over 6 years ago
- Status changed from Résolu to Fermé
- Remaining (hours) changed from 0.25 to 0.0