Projet

Général

Profil

Actions

Anomalie #51

fermé

"TypeError: 'NoneType' object has no attribute '__getitem__'" loading an iso19139 xml

Ajouté par Andrea Peri il y a plus de 9 ans. Mis à jour il y a plus de 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
Début:
04/11/2014
Echéance:
04/11/2014
% réalisé:

100%

Temps estimé:
0.50 h
# ref:

Description

Using the next coming version of qsphere (2.6.1) I try to load an xml.

This give a python error

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last):
  File "C:/Users/andrea/.qgis2/python/plugins\qsphere\ui_catalogue.py", line 762, in LoadDataFromXML
    self.UpdateWidget(key, zWidgetValues[key], myISO)
  File "C:/Users/andrea/.qgis2/python/plugins\qsphere\ui_catalogue.py", line 787, in UpdateWidget
    zType = elt['type'][0:1]
TypeError: 'NoneType' object has no attribute '__getitem__'

Versione Python:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Versione di QGIS:
2.6.0-Brighton Brighton, exported

Percorso Python: ['C:/MY-PRO~1/osgeo4w/apps/qgis/./python/plugins\\processing', 'C:/MY-PRO~1/osgeo4w/apps/qgis/./python', u'C:/Users/andrea/.qgis2/python', u'C:/Users/andrea/.qgis2/python/plugins', 'C:/MY-PRO~1/osgeo4w/apps/qgis/./python/plugins', 'C:\\MY-PRO~1\\osgeo4w\\bin\\python27.zip', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\DLLs', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\plat-win', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\lib-tk', 'C:\\MY-PRO~1\\osgeo4w\\bin', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win32.egg', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\python_dateutil-2.2-py2.7.egg', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\pytz-2014.2-py2.7.egg', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\six-1.6.1-py2.7.egg', 'C:\\MY-PRO~1\\osgeo4w\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\Users\\andrea\\.qgis2\\python\\plugins\\MetaSearch\\ext-libs', '.', 'C:\\MY-PRO~1\\osgeo4w\\apps\\qgis\\python\\plugins\\fTools\\tools']

I'm using qgis 26.0 and italian interface on windows 7.

A add the zip with the xml used to test.


Fichiers

ucs_pc_iso19139.zip (4,31 ko) ucs_pc_iso19139.zip the xml used to test. Andrea Peri, 04/11/2014 14:54

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Echéance mis à 07/11/2014
  • Assigné à mis à Christophe MASSE
  • Version cible mis à QSphere 2.6.1
  • % réalisé changé de 0 à 60

Le problème semble concerné les dates (absence d'information).
Mais il existe un contrôle de vérification du type d'objet (type(elt) == dict) qui semble interprété à Vrai avec elt à None.
Ajout de contrôles additionnels ? Tests en cours avec le XML incriminé.

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Echéance changé de 07/11/2014 à 04/11/2014
  • % réalisé changé de 60 à 100
  • Temps estimé mis à 0.50 h

Les premiers tests semblent corriger le bug.
En attente confirmation des tests complémentaires des utilisateurs.

Mis à jour par Christophe MASSE il y a plus de 9 ans

  • Statut changé de Nouveau à Fermé
Actions

Formats disponibles : Atom PDF