New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: check for minimum version of folium #2187
Comments
Do you have the full traceback? If it's only about a single keyword, it might also be relatively easy to fix that in geopandas to avoid this small annoyance. |
It is not about a keyword, it doesn't work at all. It happens during the initialization of a default marker type (even though the marker itself is not used). import geopandas
df = geopandas.read_file(geopandas.datasets.get_path("nybb"))
df.explore()
TypeError Traceback (most recent call last)
<ipython-input-3-087623d14df8> in <module>()
2
3 df = geopandas.read_file(geopandas.datasets.get_path("nybb"))
----> 4 df.explore()
1 frames
/usr/local/lib/python3.7/dist-packages/geopandas/explore.py in _explore(df, column, cmap, color, m, tiles, attr, tooltip, popup, highlight, categorical, legend, scheme, k, vmin, vmax, width, height, categories, classification_kwds, control_scale, marker_type, marker_kwds, style_kwds, highlight_kwds, missing_kwds, tooltip_kwds, popup_kwds, legend_kwds, **kwargs)
511 marker_kwds["radius"] = marker_kwds.get("radius", 2)
512 marker_kwds["fill"] = marker_kwds.get("fill", True)
--> 513 marker = folium.CircleMarker(**marker_kwds)
514 else:
515 raise ValueError(
TypeError: __init__() missing 1 required positional argument: 'location' https://colab.research.google.com/drive/1aJySwBvJvYDaAinDZwQ0R9riEqbtwqvn?usp=sharing |
It seems the change to have There might of course be other issues, but it should be rather straightforward to add a |
The minimum required by GeoPandas now is 0.12 (corresponding to NEP29 now). We can potentially check for that as a minimum version and raise an error if an older is installed but I am not sure how important that is now when 0.14 is the latest version. |
I've found that we require some recent version of folium with
explore
. I haven't yet checked which is needed but 0.8.3 that comes pre-installed in Google Colab is too old and raises an error. We should capture that and raise an informative error, instead of existing coming from folium (something aboutmissing 1 required positional argument: “location”
).In case someone stumbles upon this issue trying to resolve Google Colab, just update folium.
The text was updated successfully, but these errors were encountered: