3

When attempting to use geopandas.read_file('xyz.shp') I will often (but not always) get an error IndexError: list index out of range. It arises in Fiona as well, in both cases while attempting to iterate through features. (See here, and also this Github issue).

Interestingly, this does not always occur. Some shapefiles are successfully loaded by geopandas, but more often than not, it fails with an IndexError.

Prior discussion has focused on the library depencencies, but the fact that it works sometimes here leads me to believe it has something to do with the shapefiles themselves, although I'm not sure what. I am using the new version of Geopandas (2.0).

Community
  • 1
  • 1
csg2136
  • 235
  • 4
  • 10

0 Answers0