[python-win32] pywintypes.com_error: -2147417843. Word COM related issue.

Wasi Khan waaaseee at gmail.com
Sat Dec 12 19:38:53 EST 2015


Hello everyone, I need to get some text from a document when I press a
certain key (captured via PyHook). I get the following error when I try to
run word.ActiveDocument.ActiveWindow.Selection.Text



*pywintypes.com_error: (-2147417843, 'An outgoing call cannot be made since
the application is dispatching an input-synchronous call.', None, None)*
Putting a sleep before the call mitigates this issues, but Windows starts
to ignore PyHook calls after like 10 hits which is sub par.

It is hard for me to understand which calls is ingoing/outgoing. What's the
best way to avoid this error? Any help would be appreciated.

Wasi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20151213/e546f698/attachment.html>


More information about the python-win32 mailing list