CartoDB / cartoframes

CARTO Python package for data scientists
BSD 3-Clause "New" or "Revised" License
251 stars 63 forks source link

Wrongly instantiated Map doesn't fail #1489

Open josemazo opened 4 years ago

josemazo commented 4 years ago

I found this bug when I tried to create a map with two layers, ignoring that the first parameter, layers should be a list, and I passed the second layer as the basemap: Map(Layer(gdf), Layer(iso_gdf)). The result is that it doesn't say anything, not even an error, and the widget is empyt.

image

Jesus89 commented 4 years ago

You need to provide a list of Layers to the Map.

Map([Layer, Layer])

However, we should add some checks to validate the input parameters.

josemazo commented 4 years ago

Yes, taking a not so quick look to the docs I got it, hehe.

Jesus89 commented 4 years ago

https://app.clubhouse.io/cartoteam/story/93708/add-params-check-on-every-function-class