GeospatialPython / pyshp

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

Shapefile Reading Error #197

Closed MrZombie69232 closed 4 years ago

MrZombie69232 commented 4 years ago

Syntax :- sf = shapefile.Reader("Users\Mr Zombie\Desktop\SortedRDR_0N1N_58E59E\837.shp") Traceback (most recent call last):

Error I am getting :-

_File "<ipython-input-12-e3bcb35a9a96>", line 1, in <module>
    sf = shapefile.Reader("Users\Mr Zombie\Desktop\SortedRDR_0N1N_58E59E\837.shp")

  File "C:\Users\Public\Anaconda3\lib\site-packages\shapefile.py", line 553, in __init__
    self.load(args[0])

  File "C:\Users\Public\Anaconda3\lib\site-packages\shapefile.py", line 646, in load
    raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName))

ShapefileException: Unable to open Users\Mr Zombie\Desktop\SortedRDR_0N1N_58E59E\837.dbf or Users\Mr Zombie\Desktop\SortedRDR_0N1N_58E59E\837.shp._
yudi941210 commented 4 years ago

file path can't find ,you need check true file path

MrZombie69232 commented 4 years ago

Thanks! It was due to space in my username ...Thanks!!