Closed jason990420 closed 2 years ago
Thank you for your report.
Can you test the branch feature-explicit-backends
? I contains changes to the dynamic backend loading to simplify using packagers, and does not reference __package__
.
Don't know how to install it from github, so I replaced all files.
After replaced all files and subdirectory under Lib\site-packages\pystray
from https://github.com/moses-palmer/pystray/tree/feature-explicit-backends/lib/pystray, then test it again, it looks fine now.
Very grateful for your help !
d:\>python setup.py py2exe
running py2exe
505 missing Modules
------------------
? AppKit imported from pystray._darwin
? Foundation imported from pystray._darwin
? IPython imported from matplotlib.backend_bases, matplotlib.pyplot
? IPython.core imported from matplotlib.backend_bases
? IPython.core.pylabtools imported from matplotlib.pyplot
? IPython.display imported from PIL.ImageShow
...
Copy DLL C:\Software\Python\DLLs\libcrypto-1_1.dll to dist\
Copy lib file C:\Software\Python\lib\site-packages\certifi\cacert.pem to dist\
Copy ExtensionDLL C:\Software\Python\Lib\site-packages\pywin32_system32\pythoncom39.dll to dist\
Copy ExtensionDLL C:\Software\Python\python3.dll to dist\
Copy ExtensionDLL C:\Software\Python\Lib\site-packages\pywin32_system32\pywintypes39.dll to dist\
d:\>cd dist
d:\dist>test3
Hello World
Thank you for your feedback!
I have made a new release pystray 0.19.1 with this fix.
The execution of EXE file compiled by py2exe and stopped when import pystray. Following show all the related information, not sure what's wrong here.
Platform
Test filea
print('Hello World')
The process
d:>cd dist
d:\dist>test3
Line # 40 in pystray/init.py get exception when execute test3.py
After checked,
__package__
will beNone
. Not sure why it happened. One more statement added to set it to'pystray'
, then everything OK.