jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
613 stars 68 forks source link

favicon.ico not defined #343

Closed jabreght closed 6 years ago

jabreght commented 6 years ago

I'm having issues with packing my script into an exe with pyinstaller. If I do a simple script it packs fine. However if I move to a more advanced script with more multiple windows and such it has an issue with

Traceback (most recent call last):
  File "Bot.py", line 70, in <module>
  File "site-packages\appJar\appjar.py", line 4471, in startSubWindow
  File "site-packages\appJar\appjar.py", line 2444, in setIcon
  File "tkinter\__init__.py", line 1865, in wm_iconbitmap
_tkinter.TclError: bitmap "C:\Users\Josh\Desktop\Python\sandbox\dist\Bot\appJar\resources\icons\favicon.ico" not defined
[7488] Failed to execute script Bot

Now i've tried getting around this by including the appJar folder into my exe location. This does get it to start, but only for a debug build with pyinstaller. If i package it into a self-contained exe it just doesn't run and gives a message of "failed to execute script". Not sure how to get it to stop using the icon for the subwindow.

jarvisteach commented 6 years ago

By default, on Windows - appJar uses it's own icon for all windows.

To stop it using the icon, you can set it to None: app.winIcon = None straight after you create the gui object.

That should prevent subWindws from having an icon. But you might still have issues with the main window having an icon...

Let me know how you get on.

jarvisteach commented 6 years ago

I'll also include an option in the next release to turn off icons when appJar is created.

fullmacht commented 4 years ago

I have the same problem. Tried to set app.winIcon = Noneand by using pyinstaller set default icon to my file. When i use showIcon = False my program did not start.