I trying to save file from GeoDataFrame to shapefile or spatialite. But for some reason i got error: **AttributeError: 'int' object has no attribute 'encode'** My GeoDataFrame appear correctly without any issuesi look's like there is something wrong with my gdf.to_file commend but i have no idea what. I also checked if i got most up to date lib. def writeIntoDatabase(fd, pts, clearance_zone_max): print ('Reading data into shp') df = pd.DataFrame(pts) dfthresh = df.loc[df[3] < clearance_zone_max] geometry = [Point(xyz) for xyz in zip(dfthresh[0], dfthresh[1], dfthresh[2])] #df = df.drop(['Lon', 'Lat', 'Alt'], axis=1) print(geometry) crs = {'init': 'epsg:27700'} gdf = GeoDataFrame(dfthresh, crs=crs, geometry = geometry) print (gdf) gdf.to_file(driver = 'ESRI Shapefile', filename = fd) Can you help me?