winapi32.GetFileVersionInfo() - problem

L. Shestov oncoro at
Fri Mar 25 04:37:38 CET 2005

I need to be able to programatically get the version info from a windows 
DLL preferably in the same format as what is displayed in the properties 

I was overjoyed to find  Mark Hammond's Python Extensions 
(  The package includes a 
little demo program "" distributed in the win32api download 
that does exactly what I need.

Unfortunately I get this error when I execute the script:

Traceback (most recent call last):
   File "C:\work\", line 8, in ?
     d=win32api.GetFileVersionInfo(fname, '\\')
pywintypes.error: (1812, 'GetFileVersionInfo:GetFileVersionInfoSize', 
'The specified image file did not contain a resource section.')

Anybody know what this means, or more importantly, if there is a 
work-around?  "fname", in the code snippit above, contains the name of a 
DLL compiled with MS Visual Studio .NET 2003.


More information about the Python-list mailing list