-
-
Notifications
You must be signed in to change notification settings - Fork 259
Closed
Labels
Description
Hey, I've just noticed that the reader can't deal with pathlib.Path
objects... (standard python3 - pathlib)
I guess it should be an easy fix (a simple str()
for any path-like object already does the trick...)
from pathlib import Path
import shapefile
shppath = Path(".... path to the shapefile")
r = shapefile.Reader(shppath) # this will fail
r.records()
r = shapefile.Reader(str(shppath)) # works as expected
r.records()