zhikrullah / pyshp

Automatically exported from code.google.com/p/pyshp
MIT License
0 stars 0 forks source link

Files with capital letters cannot be read #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
From using the direct shapefile.py version: 1.2.0 on Linux

If my shapefile is MYFILE.SHP, in /my/folder/, when I call 
shapefile.Reader('/my/folder/MYFILE.SHP'), the script raises the following 
error:

Traceback (most recent call last):
  File "...shapefileconverter.py", line 31, in <module>
    get_file(args.file)
  File "convert/shapefileconverter.py", line 21, in get_file
    sf = shapefile.Reader(filepath)
  File ".../shapefile.py", line 220, in __init__
    self.load(args[0])
  File "...shapefile.py", line 253, in load
    raise ShapefileException("Unable to open %s.shp" % shapeName)
shapefile.ShapefileException: Unable to open /my/folder/MYFILE.shp

Note: shapefileconverter is my own script, and I replaced all my paths  with ...

Workaround (tested and effective) :
cp MY_FILE.SHP MY_FILE.shp 

The script is then able to read the shapefile. 

Original issue reported on code.google.com by alexvana...@gmail.com on 22 Apr 2014 at 6:56