[python-win32] 'NoneType' object is not callable
apocalypznow
apocalypznow at yahoo.com
Tue Sep 7 03:16:51 CEST 2004
I always get this error when calling a function on the automation
server: 'NoneType' object is not callable
Then the python program stops executing. In the code below,
mfcserver.SendMessage1() gives the error, and the print "Finished" line
never executes.
It looks as though the dispatch is happening dynamically. The error
happens even if gencache is not used.
Code:
from win32com.client import gencache
gencache.EnsureModule('{6CAC46EE-C71C-475C-B372-2E988DA78678x0x1x0}', 0,
1, 0)
mfcserver = win32com.client.Dispatch("Testmfcserver.Application")
mfcserver.SendMessage1("Hello server.")
print "Finished"
More information about the Python-win32
mailing list