Hi,

i'm trying to run the following code and get this error


import win32com.client as win32import os

excel = win32.gencache.EnsureDispatch('Excel.Application')


Traceback (most recent call last):
  File
"C:\Users\nabeelah.bijapur\Documents\Anaconda3\lib\site-packages\win32com\client\gencache.py",
line 532, in EnsureDispatch
    ti = disp._oleobj_.GetTypeInfo()
pywintypes.com_error: (-2147418111, 'Call was rejected by callee.', None,
None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"C:\Users\nabeelah.bijapur\Documents\Anaconda3\lib\site-packages\win32com\client\gencache.py",
line 543, in EnsureDispatch
    raise TypeError("This COM object can not automate the makepy process -
please run makepy manually for this object")
TypeError: This COM object can not automate the makepy process - please run
makepy manually for this object

What is the solution for this.
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to