mhchst
November 7, 2024, 5:47pm
1
I get the StreamlitAPIException: The value “:material/table_convert:” is not a valid Material icon.
My app is running on streamlit cloud.
Goyo
November 8, 2024, 12:18pm
2
Funny, all but two of the “table_xxx” icons work. Only the commented lines in the following code raise the exception. No idea who’s fault it is.
import streamlit as st
st.button(label="Table Bar", icon=":material/table_bar:")
st.button(label="Table Chart", icon=":material/table_chart:")
st.button(label="Table Chart View", icon=":material/table_chart_view:")
# ~ st.button(label="Table Convert", icon=":material/table_convert:")
# ~ st.button(label="Table Edit", icon=":material/table_edit:")
st.button(label="Table Eye", icon=":material/table_eye:")
st.button(label="Table Rows", icon=":material/table_rows:")
st.button(label="Table View", icon=":material/table_view:")
mhchst
November 8, 2024, 12:31pm
3
“filter_arrow_right” is also not working (thought it may be the double “_” but “vpn_key_off” works…)
edsaac
November 8, 2024, 2:03pm
4
I think that’s a bug.
The icon name needs to be in this set in material_icon_names.py to be recognized by Streamlit. That set is generated by this script called scripts/update_material_icon_names.py , which reads the material icon names and codepoints from this other file in the material-fonts repository.
But the last time material_icon_names.py was updated in Streamlit’s repo was five months ago, so the available codepoints used to generate that set was likely this version which did not include, for example, table_convert or table_edit.
edsaac
November 8, 2024, 8:29pm
5
Likely fixed for next release
opened 02:26PM - 08 Nov 24 UTC
closed 05:52PM - 08 Nov 24 UTC
type:bug
### Checklist
- [X] I have searched the [existing issues](https://github.com/st… reamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.
### Summary
From this discussion: https://discuss.streamlit.io/t/table-convert-material-icon-doesnt-exist/85146
************
There are icons that exist in the Material Symbols docs (for example, [`table_convert`](https://fonts.google.com/icons?selected=Material+Symbols+Outlined:table_convert:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=table+convert&icon.size=24&icon.color=%235f6368)) but are not recognized by Streamlit:
`StreamlitAPIException: The value “:material/table_convert:” is not a valid Material icon.`
******
The icon name needs to be in [this set in `material_icon_names.py`](https://github.com/streamlit/streamlit/blob/develop/lib/streamlit/material_icon_names.py) to be recognized by Streamlit. That set is generated by [`scripts/update_material_icon_names.py`](https://github.com/streamlit/streamlit/blob/develop/scripts/update_material_icon_names.py), which reads the material icon names and codepoints from [this other file in the material-fonts](https://github.com/google/material-design-icons/blob/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.codepoints) repository.
But the last time `material_icon_names.py` was updated in Streamlit's repo was five months ago, so the available codepoints used to generate that set was [likely this version](https://github.com/google/material-design-icons/blob/9ab636ffe26db9667fdfc2b883805fe4040b0de9/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.codepoints) which did not include, for example, `table_convert` or `table_edit`.
### Reproducible Code Example
```Python
import streamlit as st
# OK
st.button(label="Table Chart View", icon=":material/table_chart_view:")
# Raises Exception
st.button(label="Table Convert", icon=":material/table_convert:")
```
### Steps To Reproduce
_No response_
### Expected Behavior
_No response_
### Current Behavior
_No response_
### Is this a regression?
- [ ] Yes, this used to work in a previous version.
### Debug info
- Streamlit version: 1.40
- Python version: 3.12
### Additional Information
Discuss link:
https://discuss.streamlit.io/t/table-convert-material-icon-doesnt-exist/85146
Edit:
This was patched with version 1.40.1