NERDSITU / superblockify

Source code for superblockify
https://superblockify.city
GNU Affero General Public License v3.0
22 stars 3 forks source link

How can solve: AttributeError: module 'osmnx' has no attribute 'project_gdf' #99

Open SaraHishamBr opened 19 hours ago

SaraHishamBr commented 19 hours ago

Capture

AttributeError Traceback (most recent call last) in <cell line: 1>() ----> 1 part = sb.ResidentialPartitioner( 2 name="Scheveningen_test", city_name="Scheveningen", search_str="Scheveningen, NL", 3 unit="time", # "time", "distance", any other edge attribute, or None to count edges 4 )

2 frames /usr/local/lib/python3.10/dist-packages/superblockify/utils.py in load_graph_from_place(save_as, search_string, add_population, only_cache, max_nodes, **gfp_kwargs) 128 # make shapely.geometry.MultiPolygon from all polygons 129 # Project to WGS84 to query OSM --> 130 mult_polygon = ox.project_gdf(mult_polygon, to_crs="epsg:4326") 131 logger.debug("Reprojected boundary to WGS84 - Downloading graph") 132 # Get graph - automatically adds distances before simplifying

AttributeError: module 'osmnx' has no attribute 'project_gdf'

cbueth commented 19 hours ago

Hello @SaraHishamBr, thank you for writing this issue. The error results from an update in the osmnx dependency, it has been updated recently. I got into the quick-fix today and will send the update out hopefully tomorrow. If you don't want to wait for this, lower the osmnx version in your environment (see https://github.com/gboeing/osmnx).

Sorry for the inconvenience, let us know if you have any other questions.