Module '' has no attribute 'choropleth'


We’re using dash and dash_leaflet for a mapping and charting project. I created a new environment and installed the latest version of everything in Python 3.8.10, now our code throws the error:

module ‘’ has no attribute ‘choropleth’

I think that this is caused by our call to “go.Choroplethmapbox”, but I can reproduce this with a simple script:

from dash_leaflet import express

Versions installed are below. Was choropleth removed, or is this a bug?

dash 1.20.0 pypi_0 pypi
dash-bootstrap-components 0.12.2 pypi_0 pypi
dash-core-components 1.16.0 pypi_0 pypi
dash-html-components 1.1.3 pypi_0 pypi
dash-leaflet 0.1.14 pypi_0 pypi
dash-renderer 1.9.1 pypi_0 pypi
dash-table 4.11.3 pypi_0 pypi
dash-trich-components 0.0.9 pypi_0 pypi

OK, I figured out a fix. Including:

was causing the problem, removing that line fixed the issue and didn’t change the map. I think that the line was copied from an earlier example bit of code, so the code that now works is:

us_counties = dl.GeoJSON(
        hideout=dict(colorscale=color_scale, classes=classes, style=style, color_prop="comm_price"),