JĂșlio Resende
11/04/2024, 2:47 PMraw_line:
type: geopandas.GenericDataset
filepath: "data/01_raw/lines/lines.shp"
file_format: file
I'm facing the error:
DatasetError: Failed while loading data from dataset GenericDataset(file_format=file,
filepath=C:/MyCodes/my_project/data/01_raw/lines/lines.shp, load_args={}, protocol=file, save_args={}).
Failed to open dataset (flags=68): /vsimem/6485f3632b634505a3cf8c07708393b2
It looks like there is an old issue related to fsspec + geopandas:
https://github.com/kedro-org/kedro/issues/695#issuecomment-973953139
My libs:
kedro==0.19.9
kedro-datasets==5.1.0
fiona==1.10.1
fsspec==2024.10.0
geopandas==1.0.1
Is anyone able to use geopandas.GenericDataset with .shp files?JĂșlio Resende
11/04/2024, 3:09 PMDmitry Sorokin
11/04/2024, 4:43 PM.shp
file. When using fsspec
, these files need to be packaged together in a .zip
. If thatâs inconvenient and you donât need fsspec
, you could create a simpler custom version of GenericDataset
without fsspec
. What do you think?
For the main version of the dataset, I believe we should keep fsspec
, even with these limitations.Juan Luis
11/04/2024, 5:04 PM"data/01_raw/lines/lines.shp"
is a local path, right? đ€ does it work if you do geopandas.read_file("data/01_raw/lines/lines.shp")
?JĂșlio Resende
11/04/2024, 5:05 PMJĂșlio Resende
11/04/2024, 5:06 PM.shp
file.
My production files are saved in a remote data storage, but I can actually custom the dataset.Dmitry Sorokin
11/04/2024, 5:08 PMfsspec
if youâre only working with local files. Just modify the dataset to use geopandas.read_file()
directly. However, youâll need fsspec
if your files are stored remotely.JĂșlio Resende
11/04/2024, 5:13 PM