mhammond / pywin32

Python for Windows (pywin32) Extensions
4.9k stars 783 forks source link

IDispatch = pythoncom.connect(IDispatch) pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None) #2252

Closed gopinath0712 closed 1 month ago

gopinath0712 commented 2 months ago

Hi Team, I am also facing this issue as listed below but above solutions not working Someone pls help?

Issue: (Refer Screenshot) File "C:\Users\SuperUser\AppData\Local\Programs\Python\Python312\Lib\site-packages\win32com\client\dynamic.py", line 84, in _GetGoodDispatch IDispatch = pythoncom.connect(IDispatch) pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None)

Details: Trying to run OPC Server simulation script using Python language

OS: Windows Server 2019 Python: Python 3.12.3 (64 bit)

Python Error1
mhammond commented 1 month ago

This is your COM object throwing an error that it doesn't support the interface being requested. You need to talk to whoever supplies the OPC server.