Skip to content
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

AttributeError: 'StepColormap' object has no attribute 'default_css' #199

Closed
sam9111 opened this issue Jul 3, 2024 · 2 comments · Fixed by #201
Closed

AttributeError: 'StepColormap' object has no attribute 'default_css' #199

sam9111 opened this issue Jul 3, 2024 · 2 comments · Fixed by #201
Labels
bug Something isn't working

Comments

@sam9111
Copy link

sam9111 commented Jul 3, 2024

with st_data = st_folium(mymap, width=725)

Screenshot 2024-07-03 at 11 15 37 AM

but it works with folium_static(mymap, width=725)

would love to know if there is someway i can make my choropleth map work with st_folium itself

@randyzwitch
Copy link
Owner

Hi @sam9111, can you post the code that generates this error? It's not clear to me where css_links.extend is being called

@blackary blackary added the bug Something isn't working label Jul 9, 2024
@sam9111
Copy link
Author

sam9111 commented Jul 10, 2024

  File "/Users/samyuktha/measuring-carbon/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
    exec(code, module.__dict__)
  File "/Users/samyuktha/measuring-carbon/app.py", line 264, in <module>
    st_data = st_folium(mymap, width=725)
  File "/Users/samyuktha/measuring-carbon/venv/lib/python3.10/site-packages/streamlit_folium/__init__.py", line 399, in st_folium
    css_links.extend([href for _, href in elem.default_css])
AttributeError: 'StepColormap' object has no attribute 'default_css'

here is the full error message which shows the error is in the streamlit_folium package

st_data = st_folium(mymap, width=725)

This is the only piece of code in my app which when switched with folium_static(mymap, width=725), it works perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants