I'm trying to read all shapefiles in a folder using this script:
import glob import geopandas as gpd infolder = r'E:/folder/test_input' shapefiles = glob.iglob(infolder+'/*.shp') gdfs = [gpd.read_file(file) for file in shapefiles]
All of the shapefiles have Chinese/Japanese characters in their names and I am getting this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 8: invalid start byte
It works fine with shapefiles of English names. How do I solve this issue?
EDIT: I am also getting this error:
UnboundLocalError: local variable 'crs_wkt' referenced before assignment
I'm not sure why as all shapefiles including English name ones are of the same coordinate system epsg:6668