Skip to content

Commit 49d724d

Browse files
wtadlerConengmo
authored andcommitted
More descriptive error in GeoJson on GeoDataFrame with missing geometries (#1039)
Have GeoJson raise a more descriptive error when passed a GeoDataFrame with missing geometries.
1 parent 75a44c3 commit 49d724d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

folium/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def __init__(self, data, style_function=None, name=None,
444444
data = data.to_crs(epsg='4326')
445445
self.data = json.loads(json.dumps(data.__geo_interface__)) # noqa
446446
else:
447-
raise ValueError('Unhandled object {!r}.'.format(data))
447+
raise ValueError('Cannot render objects with any missing geometries. {!r}'.format(data))
448448

449449
self.style_function = style_function or (lambda x: {})
450450

0 commit comments

Comments
 (0)