BlenderGIS icon indicating copy to clipboard operation
BlenderGIS copied to clipboard

Can't Import Separate .shp objects if a DateTime exists in the XML

Open DanteCash98 opened this issue 2 years ago • 1 comments

Blender and OS versions

Windows 10, Blender 2.91 (also tested 3.2, 3.0, 2.83)

Describe the bug

Importing separate objects from .shp files causes an error and stops importing. The .shp.xml file has datetime data in it, but should at least be ignored instead of break the plugin.

How to Reproduce

Load any shapefile as separate objects with a date column in the associated XML.

Error message

INFO:BlenderGIS-228.operators.io_import_shp:355:Read shapefile... INFO:BlenderGIS-228.operators.io_import_shp:365:Feature type : PolygonZ DEBUG:BlenderGIS-228.operators.io_import_shp:381:DBF fields : ['Entity', 'Handle', 'Layer', 'LyrFrzn', 'LyrOn', 'Color', 'Linetype', 'Elevation', 'LineWt', 'RefName', 'DocUpdate', 'DocId', 'Name', 'Condititon', 'Type', 'Field', 'Shape_Leng', 'Shape_Area', 'Road_A'] ERROR:BlenderGIS-228:96:Uncaught exception Traceback (most recent call last): File "C:\Users\614788\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\BlenderGIS-228\operators\io_import_shp.py", line 695, in execute obj[fieldName] = record[i-1] TypeError: invalid id-property type datetime.date not supported ERROR:BlenderGIS-228.operators.io_import_shp:292:Shapefile import fails Traceback (most recent call last): File "C:\Users\614788\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\BlenderGIS-228\operators\io_import_shp.py", line 290, in execute extrusionAxis=self.extrusionAxis, separateObjects=self.separateObjects) File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\bpy\ops.py", line 130, in call ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo) RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\614788\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\BlenderGIS-228\operators\io_import_shp.py", line 695, in execute obj[fieldName] = record[i-1] TypeError: invalid id-property type datetime.date not supported

location: C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\modules\bpy\ops.py:130

DanteCash98 avatar Jun 23 '22 18:06 DanteCash98

UPDATE: Resetting Factory Defaults seems to fix this issue, but this needs to be done even on a fresh install.

DanteCash98 avatar Jun 23 '22 20:06 DanteCash98