Development #37218
crash import formulaire 'NoneType' object has no attribute 'encode' (e.text.encode(charset))
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
25 octobre 2019
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
Exception: type = '<type 'exceptions.AttributeError'>', value = ''NoneType' object has no attribute 'encode'' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/fields.py", line 281, in init_with_xml 279 v = {} 280 for e in el: > 281 v[e.tag] = e.text.encode(charset) 282 else: 283 print('currently:', self.__dict__) locals: attribute = 'data_source' charset = 'utf-8' e = <Element 'type' at 0x7ff91ea47690> el = <Element 'data_source' at 0x7ff91ea47550> elem = <Element 'field' at 0x7ff91ea47250> include_id = True self = <StringField None 'Nom de la rue'> v = {} x = <Element 'display_location' at 0x7ff91ea47190> File "/usr/lib/python2.7/dist-packages/wcs/fields.py", line 778, in init_with_xml 776 777 def init_with_xml(self, element, charset, include_id=False): > 778 super(StringField, self).init_with_xml(element, charset, include_id=include_id) 779 self.migrate() 780
Historique
Mis à jour par Thomas Noël il y a plus de 4 ans
Mais je n'ai pas le xml tenté, donc pas bien facile de voir.
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Nouveau à Solution déployée
A priori traité de manière globale dans #39240.