Dock Icon appears and the disappears

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dock Icon appears and the disappears

Thor Tepper-Garcia
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/433806F3-63A9-4FDF-B305-6B397C180B55%40gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/433806F3-63A9-4FDF-B305-6B397C180B55%40gmail.com.

Info.plist (707 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dock Icon appears and the disappears

mathman
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="8R65UuNPAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pyins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/pyinstaller/939cc978-c787-4040-a850-5124cff6f7fe%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/bb50c338-2172-4b79-9027-79a272c6cdd1o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Dock Icon appears and the disappears

bwoodsend

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

On Sunday, June 21, 2020 at 9:40:01 AM UTC+1 mathman wrote:
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5af6d504-f8b1-4a41-956d-a8e15dab49c7n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Dock Icon appears and the disappears

bwoodsend

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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5ffff269-0107-4f7a-89ad-f6de079ca344n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Dock Icon appears and the disappears

Thor Tepper-Garcia
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



> On 21 Jul 2020, at 10:11, bwoodsend <[hidden email]> wrote:
>
> 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
>
>
> --
> 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 [hidden email].
> 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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/ED0C6B07-0D82-4636-BC7C-0E7690CBD23A%40gmail.com.