Closed
Description
I tried to create a Shapefile of NULL type with several records. When I tried to save it I got this exception:
File "C:\Projects\Sources\Arboretum\src\shapefile.py", line 1030, in save
self.saveShx(target)
File "C:\Projects\Sources\Arboretum\src\shapefile.py", line 993, in saveShx
self.shapeType = self._shapes[0].shapeType
IndexError: list index out of range
The reason is this condition: if not self.shapeType:
in the Writer.saveShp and Writer.saveShx methods. When the condition is changed to if self.shapeType is None:
the Shapefile is saved successfully.