Describe the bug
Sometimes when using the main growbikenet function, I receive a KeyError when importing a street network, even if it is the same as the one used in the function. This is not systematically the case, sometimes it works and sometimes it doesn't, with no obvious pattern.
To Reproduce
If I do:
edges_ranked = gbn.growbikenet(
"Asti",
ranking="betweenness_centrality",
export_data=False,
)
It works, but if instead I do:
file_out = "gdf_osm.gpkg"
city_boundary_gdf = ox.geocoder.geocode_to_gdf("Asti")
city_boundary_geometry = city_boundary_gdf.geometry[0]
G = ox.graph_from_polygon(city_boundary_geometry, network_type="drive")
ox.io.save_graph_geopackage(G, file_out)
edges_ranked = gbn.growbikenet(
"Asti",
ranking="betweenness_centrality",
export_data=False,
import_files={"street_network": file_out},
)
I receive a KeyError.
Expected behavior
I should not receive the KeyError when I import the street network.
Desktop (please complete the following information):
Describe the bug
Sometimes when using the main
growbikenetfunction, I receive aKeyErrorwhen importing a street network, even if it is the same as the one used in the function. This is not systematically the case, sometimes it works and sometimes it doesn't, with no obvious pattern.To Reproduce
If I do:
It works, but if instead I do:
I receive a
KeyError.Expected behavior
I should not receive the
KeyErrorwhen I import the street network.Desktop (please complete the following information):