I'm trying to receive a simple .shp file, without been zipped, via web request and convert it to a geopandas dataframe. I tried to use io.BytesIO to wrap the file but also didn't worked.. I tried to load directly to geopandas but this is what happened:
File "fiona/_shim.pyx", line 81, in fiona._shim.gdal_open_vector fiona.errors.DriverError: '/vsimem/9ead9a26f6de48e987cc6474e377012b/9ead9a26f6de48e987cc6474e377012b' not recognized as a supported file format. The code:
import geopandas as gpd ... file = request.files[filename] if file and allowed_file(filename): geo2 = gpd.read_file(file) print(geo2)
.shp. Thank you @LeonPowałka, Since the geopandas.read_file() only requires the path for the.shpI thought was not necessary the corresponding dbf and shx files.