Projet

Général

Profil

Tâche #19542

Scénario #19476: Traitements express EWT

Les messages traduits dans le nouveau loader ne sont plus affiché

Ajouté par Emmanuel GARETTE il y a environ 7 ans. Mis à jour il y a environ 7 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Gwenael Remond
Début:
08/02/2017
Echéance:
% réalisé:

100%

Temps estimé:
1.00 h
Temps passé:
Restant à faire (heures):
0.0

Description

Les messages d'erreurs sont retournées en unicode et non en str.

# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from creole.loader import creole_loader
/usr/share/creole/funcs/quota.py - déjà défini : system_out
>>> c=creole_loader(load_extra=True)
Une variable de l'espace de nom quota ne devrait pas être utilisée dans l'espace quota.quota.quota_maxfactor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 753, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 438, in space_visitor
    SpaceAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 791, in __init__
    self._parse_object_space(space, None)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 883, in _parse_object_space
    self._parse_subobject_space(name, node_name, space, subspace, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 908, in _parse_subobject_space
    self._parse_subobject_space(subname, name, space, subspace, None, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 905, in _parse_subobject_space
    self._parse_object_space(subspace, current_namespace, name, parent_path, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 883, in _parse_object_space
    self._parse_subobject_space(name, node_name, space, subspace, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 910, in _parse_subobject_space
    self.absolute_paths_annotation(name, node_name, parent, space, parent_path, namespace, ishelp)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1060, in absolute_paths_annotation
    subpath = self.paths.get_variable_path(value_name, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 602, in get_variable_path
    dico['namespace'], current_namespace))
creole.error.CreoleDictConsistencyError: <exception str() failed>

Révisions associées

Révision 855efdda (diff)
Ajouté par Gwenael Remond il y a environ 7 ans

the translated messages aren't in unicode so that they can appear in the ead3

Ref  #19542

Historique

#1 Mis à jour par Gwenael Remond il y a environ 7 ans

  • Temps estimé changé de 4.00 h à 1.00 h
  • Restant à faire (heures) changé de 4.0 à 0.0

#2 Mis à jour par Gwenael Remond il y a environ 7 ans

  • % réalisé changé de 0 à 100

#3 Mis à jour par Gwenael Remond il y a environ 7 ans

  • Assigné à mis à Gwenael Remond

#4 Mis à jour par Gwenael Remond il y a environ 7 ans

  • Statut changé de Nouveau à En cours

#5 Mis à jour par Scrum Master il y a environ 7 ans

  • Statut changé de En cours à Résolu

#6 Mis à jour par Lionel Morin il y a environ 7 ans

Testé avec en remplaçant une variable par une autre dans un dico (ex dans majonce/00_action.xml, majonce.mise_a_jour.majoption => shutdown.shutdown.typeex), puis :

>>> from creole.loader import creole_loader
>>> c = creole_loader(load_extra=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 753, in creole_loader
    eolobj.space_visitor()
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 438, in space_visitor
    SpaceAnnotator(self.space, self.paths, self)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 790, in __init__
    self.filter_condition(space.constraints.condition)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1470, in filter_condition
    self.filter_target(condition, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/annotator.py", line 1379, in filter_target
    target.name = self.paths.get_variable_path(target.name, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/objspace.py", line 599, in get_variable_path
    dico['namespace'], current_namespace).encode('utf8'))
creole.error.CreoleDictConsistencyError: Une variable de l'espace de nom shutdown ne devrait pas être utilisée dans l'espace majonce

=> C'est bien l'erreur attendue

#7 Mis à jour par Lionel Morin il y a environ 7 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF