Dock Icon appears and the disappears

45 views
Skip to first unread message

ttepperg

unread,
Apr 30, 2020, 4:06:44 AM4/30/20
to PyInstaller
Sorry to resend this, but I’ve gotten no replies and still have not found a solution for this. I’m observing the same behaviour now on High Sierra.
It is truly driving me crazy…

ANY hint will be highly appreciated. Thanks a lot in advance.


Hi guys,

I have built a Python/Tkinter app, which works well in every respect,
with the following exception: When opened, the app's icon briefly
appears on the Dock and then disappears, even though the app
is still running (i.e. the GUI window is open, as it should)

FYI: The dock icon is contained within myappsname/Contents/Resources,
and from what I can tell, the Info.plist file looks fine (attached).

I'm using Pyinstaller 3.6 on Mac El Capitan.

Many thanks for any hints on how to solve this one!

Cheers,

Thor.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com.
Info.plist

mathman

unread,
Jun 21, 2020, 4:40:01 AM6/21/20
to PyInstaller
I have a similar issue for a Python/Tkinter app using numpy, scipy, and matplotlib.
mac OS Catalina (10.15.5)
Python v3.7.7
PyInstaller v3.6.
Using conda virtual environment.

I execute:
>>pyinstaller --noconsole --onefile --windowed myapp.py

PyInstaller tosses one warning and one error, which may or may not be relevant:
19972 WARNING: library user32 required via ctypes not found
20162 ERROR: Can not find path ./libtbb.dylib (needed by .../conda/lib/libmkl_tbb_thread.dylib)

in the "dist" directory are two files:
myapp (Unix executable, size 215.6 mb; black icon)
myapp (Application, size 215.7 mb; fancy blue floppy disk with yellow duck logo icon)

When I double-click the Unix executable icon, it loads the annoying Terminal window and then does, eventually, bring up my app, which works!  When I double-click the myapp Application icon, the computer briefly puts an icon into the dock, and then it disappears, and then a few seconds later the icon flashes in the dock a second time but very briefly.

When I "Show Contents" on the myapp Application, here is the Info.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDisplayName</key>
    <string>myapp</string>
    <key>CFBundleExecutable</key>
    <string>MacOS/myapp</string>
    <key>CFBundleIconFile</key>
    <string>icon-windowed.icns</string>
    <key>CFBundleIdentifier</key>
    <string>myapp</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>myapp</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>0.0.0</string>
</dict>
</plist>


It is difficult to know where to begin to identify and solve the issue.  Any help is appreciated.
Thank you


On Thursday, April 30, 2020 at 4:06:44 AM UTC-4, ttepperg wrote:
Sorry to resend this, but I’ve gotten no replies and still have not found a solution for this. I’m observing the same behaviour now on High Sierra.
It is truly driving me crazy…

ANY hint will be highly appreciated. Thanks a lot in advance.

Hi guys,

I have built a Python/Tkinter app, which works well in every respect,
with the following exception: When opened, the app's icon briefly
appears on the Dock and then disappears, even though the app
is still running (i.e. the GUI window is open, as it should)

FYI: The dock icon is contained within myappsname/Contents/Resources,
and from what I can tell, the Info.plist file looks fine (attached).

I'm using Pyinstaller 3.6 on Mac El Capitan.

Many thanks for any hints on how to solve this one!

Cheers,

Thor.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyins...@googlegroups.com.

bwoodsend

unread,
Jun 22, 2020, 3:39:12 AM6/22/20
to PyInstaller

Hi,

Firstly, apologies to Thor for the lack of response. It looks like there aren’t many mac users on here. I’m not a mac user but i have noticed some inconsistent behaviour on my Windows that could be the source. Could you please clarify, by setting the icon you mean calling root.iconbitmap(icon_path) inside the Python code and not setting the executable’s icon via the -i icon-path.ico option?

I’ve knocked together a hello-world example to play with. Could you try building and running it for me? I’m particularly interested to see if and where in the bundle it puts the ico file as was behaving strangely on my Windows.

Brénainn

bwoodsend

unread,
Jul 21, 2020, 4:27:51 AM7/21/20
to PyInstaller

Hi,

This got raised as an issue then posted on stackoverflow and someone’s managed to solve it! Hopefully you can finally fix your apps now.

Brénainn

Thor Tepper-Garcia

unread,
Jul 21, 2020, 9:52:57 AM7/21/20
to pyins...@googlegroups.com
Hi Brénainn,

Thanks for your email.

Unfortunately, these are two seperate issues, I’m afraid. The post you are referring to deals with app’s icon as shown on a Finder window. Surprisingly, I don’t have that issue.

My issue is related to the icon shown in the Dock when launching the app.

For the time being, I’ve given up on solving the issue, as it does not really impair the performance of my app.

Btw, my apps are used for research only, i.e. not for profit. If we get this to work properly, and I can distribute the app to, say, my students, I may convince my institution to donate a given amount to the Pyinstaller fund. It is amazing of you gyys that the package is given out to the community for free, and I feel that that should be rewarded. Just saying ;)

Cheers,

Thor.

_______________________________________________
Dr. Thorsten Tepper García | Astrophysicist
Centre for Integrated Sustainability Analysis (ISA)
Sydney Institute for Astronomy (SIfA)
The University of Sydney
www.thorsten.mx
> --
> You received this message because you are subscribed to the Google Groups "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5ffff269-0107-4f7a-89ad-f6de079ca344n%40googlegroups.com.




____________________________
Dr. Thorsten Tepper García
Astrophysicist
www.thorsten.mx
@thorsten_mx

Reply all
Reply to author
Forward
0 new messages