Hi, I’m using python 3.8.5 32 bit and also I have installed pywin32 by this command pip install pywin32 but when I execute my coed i’m getting the following error pywintypes.com_error: (-2147221005, 'Invalid class string', None, None) My code : import win32com.client client = win32com.client.Dispatch('OpcLabs.EasyOpc.DataAccess.EasyDAClient') value = client.ReadItemValue('','OPCLabs.KitServer.2', 'Demo.Single') print('value:',value) output: Traceback (most recent call last): File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", line 89, in _GetGoodDispatch IDispatch = pythoncom.connect(IDispatch) pywintypes.com_error: (-2147221005, 'Invalid class string', None, None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".\test.py", line 3, in <module> client = win32com.client.Dispatch('OpcLabs.EasyOpc.DataAccess.EasyDAClient') File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) pywintypes.com_error: (-2147221005, 'Invalid class string', None, None) can you help me with this? Thanks & Regards, Saleem. |
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32