In [13]: sf = shapefile.Reader('/home/akira/tmp/NLNI/Rivers/W05-09_01_GML/W05-09_01-g_Stream.shp', encoding='shift-jis')
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-13-9cb378269942> in <module>()
----> 1 sf = shapefile.Reader('/home/akira/tmp/NLNI/Rivers/W05-09_01_GML/W05-09_01-g_Stream.shp', encoding='shift-jis')
/home/akira/src/python/pyshp/shapefile.pyc in __init__(self, *args, **kwargs)
320 if len(args) > 0:
321 if is_string(args[0]):
--> 322 self.load(args[0])
323 return
324 if "shp" in kwargs.keys():
/home/akira/src/python/pyshp/shapefile.pyc in load(self, shapefile)
379 self.__shpHeader()
380 if self.dbf:
--> 381 self.__dbfHeader()
382
383 def __del__(self):
/home/akira/src/python/pyshp/shapefile.pyc in __dbfHeader(self)
575 idx = len(fieldDesc[name]) - 1
576 fieldDesc[name] = fieldDesc[name][:idx]
--> 577 fieldDesc[name] = u(fieldDesc[name], "ascii")
578 fieldDesc[name] = fieldDesc[name].lstrip()
579 fieldDesc[1] = u(fieldDesc[1], "ascii")
/home/akira/src/python/pyshp/shapefile.pyc in u(v, encoding, encodingErrors)
94 if isinstance(v, bytes):
95
---> 96 return v.decode(encoding, encodingErrors)
97 elif isinstance(v, unicode):
98
UnicodeDecodeError: 'ascii' codec can't decode byte 0x90 in position 0: ordinal not in range(128)