GeospatialPython / pyshp

This library reads and writes ESRI Shapefiles in pure Python.
MIT License
1.1k stars 260 forks source link

Reader fails if file extension is uppercase #117

Closed erickskb closed 6 years ago

erickskb commented 7 years ago

I ran into an issue where I receive a shapefile from an external system where the filename and extension is all uppercase. (/SHAPEFILE.SHP) the load function in the Reader class failed to read the file, because it is appending .shp, .shx, .dbf to /SHAPEFILE and attempting to open the file, this throws an IOError because the open function is case sensitive and /SHAPEFILE.shp does not exist. Instead of having to re-save the file with a lowercase extension, I think pyshp should support this.

I've created a pull request with a fix: https://github.com/GeospatialPython/pyshp/pull/116

karimbahgat commented 6 years ago

Fixed in #116