melvinquick/scramble-generator

Logo Path Issues

Closed this issue · 1 comments

Problem

Had to use a full file path in the app.py file to get the icon to show properly.

Expected Result

The path should only need to be /images/logo-512x512.ico since the /images/ directory is in the project directory.

Fixed with following code:

here = os.path.dirname(os.path.abspath(__file__))
icon = 'images/logo-512x512.ico'
icon_fullpath = os.path.join(here, icon)

From there I just needed to use the new icon_fullpath variable in place of the full literal path I was using.