Projet

Général

Profil

Bug #25954

Mis à jour par Thomas Noël il y a plus de 5 ans

Sur
REQUEST_URI '/api/validate-condition?value_django=Une+d%C3%A9ch%C3%A8terie+&value_python=&type=django'

<pre>
Exception:
type = '<type 'exceptions.UnicodeEncodeError'>', value = ''ascii' codec can't encode character u'\xe9' in position 9:
ordinal not in range(128)'

Stack trace (most recent call first):
File "/usr/lib/python2.7/dist-packages/wcs/conditions.py", line 96, in validate_django
94 get_publisher().get_default_templatetags_libraries(), self.value))
95 except TemplateSyntaxError as e:
> 96 raise ValidationError(_('syntax error: %s') % e)

locals:
e = TemplateSyntaxError(u"Unused 'd\xe9ch\xe8terie' at end of if expression.",)
self = <Condition (django) 'Une d\xc3\xa9ch\xc3\xa8terie '>

File "/usr/lib/python2.7/dist-packages/wcs/conditions.py", line 81, in validate
79 if not hasattr(self, 'validate_' + self.type):
80 raise ValidationError(_('unknown condition type'))
> 81 return getattr(self, 'validate_' + self.type)()
82
83 def validate_python(self):

locals:
self = <Condition (django) 'Une d\xc3\xa9ch\xc3\xa8terie '>

File "/usr/lib/python2.7/dist-packages/wcs/api.py", line 749, in validate_condition
747 except ValidationError as e:
748 hint['klass'] = 'error'
> 749 hint['msg'] = str(e)
750 return json.dumps(hint)
751

locals:
condition = {'type': 'django', 'value': 'Une d\xc3\xa9ch\xc3\xa8terie '}
hint = {'msg': '', 'klass': None}
self = <wcs.api.ApiDirectory object at 0x7f23119c94d0>
</pre>

Retour