Hi,
I'm testing the excelRTDServer.py example RTD Server (TimeServer):
Win7-SP1 64-Bit
Excel 2007 32-Bit
Python 2.6.6 32-Bit
pywin32-216
and get a generic COM exception when the RTD server tries to notify Excel of
data changes (from the trace collector):
Traceback (most recent call last):
File "C:\Python26\Lib\threading.py", line 532, in __bootstrap_inner
self.run()
File "C:\Python26\Lib\threading.py", line 736, in run
self.function(*self.args, **self.kwargs)
File
"C:\Data\svnwork\tavendo\mymepad\research\semweb\python\excelRTDServer.py",
line 378, in Update
self.SignalExcel()
File
"C:\Data\svnwork\tavendo\mymepad\research\semweb\python\excelRTDServer.py",
line 153, in SignalExcel
self.__callback.UpdateNotify()
File
"C:\Python26\lib\site-packages\win32com\gen_py\00020813-0000-0000-C000-000000000046x0x1x6.py",
line 17088, in UpdateNotify
return self._oleobj_.InvokeTypes(10, LCID, 1, (24, 0), (),)
com_error: (-2147352567, 'Ausnahmefehler aufgetreten.', (0, None, None, None,
0, 0), None)
The COM Error is: "generic COM exception 0x80020009"
The callpath that leads to the exception is:
excelRTDServer.py
==============
L281 ff:
class TimeServer(ExcelRTDServer):
..
def __init__(self):
..
self.ticker = threading.Timer(self.INTERVAL, self.Update)
..
L330 ff:
def Update(self):
..
self.SignalExcel()
..
L129 ff:
def SignalExcel(self):
..
self.__callback.UpdateNotify()
..
site-packages\win32com\gen_py\00020813-0000-0000-C000-000000000046x0x1x6.py
=================================================================
Line 17080 ff:
class IRTDUpdateEvent(DispatchBaseClass):
..
def UpdateNotify(self):
return self._oleobj_.InvokeTypes(10, LCID, 1, (24, 0), (),)
..
*****
After some Googling, the best hint I came up with is:
"Apparently in Excel 12 (Excel 2007) the RTD callback object that implements
dual IRTDUpdateEvent
interface throws exception (generic COM exception 0x80020009) when is called
via IDispatch.
If you use v-table binding the call to UpdateNotify succeeds. I don?t really
know whether it
is a bug in Excel 12 or a feature."
http://www.nevaobject.com/phpbb3/viewtopic.php?t=516
To check if that is the problem, I'd like to do the callback not via IDispatch,
but via VTable.
Is that possible in pywin32?
Thanks alot,
Tobias
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32