pywin32 and pygui error Version not found

1.4k Views Asked by At

I installed pygui and pywin32 for my 64-bit python 2.7 (I installed 64-bit for those too) and when I try to use pygui, which uses pywin32, python gives me this error.

I'm sure that other people might have similar problems.

Traceback (most recent call last):
  File "C:\Users\MY_USERNAME_HERE\Dropbox\Python Programs\BlobEdit\BlobEdit.py", line 16, in <module>
    from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\__init__.py", line 94, in <module>
    import GUI.Application
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\Application.py", line 11, in <module>
    from GUI.GApplications import Application as GApplication
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\GApplications.py", line 14, in <module>
    from GUI.Printing import PageSetup, present_page_setup_dialog
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\Printing.py", line 11, in <module>
    from GUI import Canvas
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\Canvas.py", line 15, in <module>
    from GUI.StdFonts import application_font
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\StdFonts.py", line 9, in <module>
    from GUI import Font
  File "C:\Program Files\python2.7.2\lib\site-packages\GUI\Font.py", line 56, in <module>
    pywin32_info = api.GetFileVersionInfo(api.__file__, '\\')
error: (1813, 'GetFileVersionInfo:GetFileVersionInfoSize', 'The specified resource type cannot be found in the image file.')

Apparently, PyWin32 can't find it's version or something. I wonder why.

2

There are 2 best solutions below

0
On

I've had this issue too, easy solution: install the minimum required pywin32 version 213. Somewhere there a version check happening in pywin32 on some file. Perhaps some day i will dig into it further and post a more detailed post and/or file a bug

0
On

I've had this issue, which led me to this question.

I'm using python 3.3 and had already installed pywin32-218, so my solution was this hack in Font.py:

#pywin32_info = api.GetFileVersionInfo(api.__file__, '\\')
pywin32_build = 218 # pywin32_info['FileVersionLS'] >> 16