Win32All InvokeTypes exception after upgrade

barry g tekkamangoogle at yahoo.com
Thu Jul 31 13:30:51 EDT 2003


When trying to upgrade my Win32All package from build 148, that came
in the ActiveState install, to any of v150 thru v156 I start receiving
an exception.  It apparently is related to the "output arguments" in
the ActiveX control's methods.  If I leave the output parameters off I
get the message at the bottom.  If I fill the arguments the function
performs happily.

Am I missing some step or setting that makes the output parameters
optional again?  I could change all my code to supply dummy values,
but we have a large enough number of COM controls and function calls
that I'd prefer to maintain the old calling style if possible.

obj.DeviceToLatLon(x,y,10,10) #works in either 148 or 156 
(35.453, -75.2214) 

obj.DeviceToLatLon(x,y) #used to return a tuple - now generates
exception
Traceback (most recent call last):
  File "ChartNotebook.py", line 978, in OnMouseMove
    lat, lon = obj.DeviceToLatLon(x, y)
  File "C:\Python22\lib\site-packages\win32com\gen_py\8754AEB3-1466-11D4-A779-0050DA6B8675x0x1x2.py",
line 62, in DeviceToLatLon
    return self._oleobj_.InvokeTypes(37, LCID, 1, (24, 0), ((3, 0),
(3, 0), (16389, 0), (16389, 0)),x, y, lat, lon)
com_error: (-2147352571, 'Type mismatch.', None, 3)


Thanks,
Barry




More information about the Python-list mailing list