Hello, i am experiencing some issues with displaying the page_icon.
it’s a bit confusing, but here is the starting code i used :
st.set_page_config(page_title=“TITLE”, page_icon=“ ”, layout=“wide”).
After running the app it works and every thing run correctly excepting the page icon that is not displayed, instead i have the globe icon.
Can anyone help me to explain that.
Thank you !
Can you try passing it as a short code: page_icon=':bar_chart:'
in case there is some odd behavior around character encoding?
Goyo
January 22, 2023, 7:48pm
3
I can reproduce your issue using streamlit 0.17.0. I tried with both emoji and shortcode, locally and in Streamlit Cloud, latest Gnome Web and Firefox (Arch).
Here is the sample code in the docs , deployed to Streamlit Cloud:
https://favicon.streamlit.app/
You can see the code by clicking “View app source” in the hamburger menu.
1 Like
Hello, i just tried with short code and nothing changes…
I spun up an example and same as @Goyo I am seeing that it’s not working for either. I am trying different icons to test more “basic” emojis and also different versions of Streamlit and Python to see if there is a point at which it broke, but it appears right now to be a bug…
Hello, Thank you for the reply.
When i click on your app i don’t have any page_icon displayed. i don’t know if it’s normal or it’s a local issue in my browser ?
marduk
January 22, 2023, 8:33pm
7
Hi everyone!
There should be a fix coming for this soon:
opened 02:26PM - 11 Jan 23 UTC
closed 11:27PM - 20 Jan 23 UTC
type:bug
status:confirmed
priority:P1
feature:st.set_page_config
### 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
As indicated at: https://github.com/twitter/twemoji/issues/580, Maxcdn is no longer operational, and since the st.set_page_config() function looks for emojis on that website:
> Emoji icons are courtesy of Twemoji and loaded from MaxCDN. [Streamlit docs](https://docs.streamlit.io/library/api-reference/utilities/st.set_page_config).
As a result, the icon that the user has indicated is not displayed.
### Reproducible Code Example
_No response_
### Steps To Reproduce
Configure the page:
```Python
st.set_page_config(
page_title="Foo",
page_icon="👀",
layout="centered",
initial_sidebar_state="auto",
menu_items={
'Get Help': 'https://github.com/foo',
'Report a bug': "https://github.com/foo",
'About': "Foo"
}
)
```
### Expected Behavior
_No response_
### Current Behavior
In developer tools, you can see the following error:

### Is this a regression?
- [x] Yes, this used to work in a previous version.
### Debug info
- Streamlit version: 1.15.0
- Python version: 3.9.13
- Operating System: Win10
- Browser: Edge (Chromium)
- Virtual environment: miniconda
### Additional Information
At the moment it can be fixed by specifying another url for the icons, for example:
https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/
In the example above, replace the emoji with the new address pointing to the chosen icon:
```Python
st.set_page_config(
page_title="Foo",
page_icon="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f440.png",
layout="centered",
initial_sidebar_state="auto",
menu_items={
'Get Help': 'https://github.com/foo',
'Report a bug': "https://github.com/foo",
'About': "Foo"
}
)
```
### Are you willing to submit a PR?
- [ ] Yes, I am willing to submit a PR!
4 Likes
Thanks @marduk . I was searching for an open issue and I guess I missed it since it was just marked closed. There is another open issue mentioning Safari specifically, so hopefully the new fix will catch up on that bug too. set_page_config page icons do not work in Safari · Issue #2514 · streamlit/streamlit · GitHub
2 Likes
Goyo
January 22, 2023, 8:53pm
9
It certainly depends on browser support. For me, Gnome Web does not show any favicon but Firefox does, just not the one I asked for.
PD. The Safari issue mentioned in another answer might be affecting Gnome Web too.
2 Likes
If I understand this merged PR correctly, this fix will apply to streamlit >= 1.18.0
?
Sorry not trying to spam the thread here, but can anyone confirm that this this fix will only apply to streamlit >= 1.18.0
?
Goyo
February 3, 2023, 9:23pm
15
Nobody knows the future but i think it is safe to assume that.
1 Like
Thanks @Goyo sorry for the spamming
Hello guys! anyone with this issue, just update streamlit version to 1.18, which is available since February 09, 2023
1 Like
I am using latest version of streamlit 1.20.0. I can’t understand how to create file py in directory /pages with emoji
for example 1_ _MyHome.py
my pycharm return me error: invalid file name
I am work in windows 11
edsaac
March 21, 2023, 9:12pm
19
I guess you are trying to name the file using emoji shortcodes, something like:
1_:home:_Myhome.py
Copy-pasting the literal emoji directly into the filename should work:
1_🏠_Myhome.py
Result:
Here is a simple website to quickly search and copy emojis: https://emojidb.org/
1 Like