pywintypes.error when running an executable.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pywintypes.error when running an executable.

Yousef El-Khalili
 I have python code for a system tray and I want to turn it into an executable. The code runs fine when I run it from eclipse but when I turn it into an executable using the command 
pyinstaller -F systray.pyw


The executable runs but is missing the icon and when I right click on it to open up an options menu, it give me this error 
"pywintypes.error: (2, 'LoadImage', 'The system cannot find the file specified.')" I added the path to pywintypes.dll to the PYTHONPATH and the line that is causing problems is this one: 
hicon = win32gui.LoadImage(1, icon, win32con.IMAGE_ICON, ico_x, ico_y, win32con.LR_LOADFROMFILE)
I am running 32-bit Anaconda Python on a 64-bit machine. I installed the latest verison of pyinstaller using 
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

I have been looking all around for a solution but I can't seem to figure it out, any hints or advice will be appreciated.

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Loading...