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

[🐛 BUG] Favicon not being displayed using run(favicon="favicon.png") #1767

Open
1 of 4 tasks
ShootingStarD opened this issue Sep 10, 2024 · 2 comments
Open
1 of 4 tasks
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@ShootingStarD
Copy link

What went wrong? 🤔

I cannot display a favicon even if I specify it in the run arguments
The favicon is 96x96 pixels in png

Expected Behavior

My favicon to be displayed

Steps to Reproduce Issue

from taipy.gui import builder as tgb
from taipy.gui import Gui
from pathlib import Path
favicon_path = Path("favicon.png")
with tgb.Page() as page:
    if favicon_path.exists():
        tgb.text("The favicon exists ")
    tgb.text("Where is my favicon?")
    
Gui(page,).run(debug=True, use_reloader=True, port=5111, favicon=str(favicon_path))

Solution Proposed

No response

Screenshots

image

Runtime Environment

Ubuntu

Browsers

Firefox

OS

Linux

Version of Taipy

3.1.1

Additional Context

taipy==3.1.1
taipy-config==3.1.1
taipy-core==3.1.1
taipy-gui==3.1.4
taipy-rest==3.1.1
taipy-templates==3.1.1

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%.
  • Create related issue in taipy-doc for documentation and Release Notes.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@ShootingStarD ShootingStarD added the 💥Malfunction Addresses an identified problem. label Sep 10, 2024
@ShootingStarD
Copy link
Author

Oki I found 2 problems

On a local instance, the path of the favicon cannot be favicon.png because it is overriden by the default Taipy favicon. Changing the name/path of the favicon makes it appears

Another problem arises when we work on ssh remote. I use VSCode on a remote SSH server to code and launch my Taipy app. In that case the path given to the favicon is an absolute path which does not takes into consideration the host ad port given to the App. This leads to html not being able to access the favicon file since it looks at the wrong location
Streamlit for example seems to store the favicon given in a media forlder on the host-port location : http://localhost:8503/media/9b77d3f0ca999423497db742fb255c034ecb4924efdc45a52bfa886a.png
Maybe taipy should use a similar approach?

@FlorianJacta FlorianJacta added 🖰 GUI Related to GUI 🟩 Priority: Low Low priority and doesn't need to be rushed labels Sep 10, 2024
@FlorianJacta
Copy link
Member

Thank you for your investigation and issue! We'll investigate on our side too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

No branches or pull requests

2 participants