'Unable to start an application using pywin32 package - invalid class string error

I have installed Python 3.10 and installed the pywin32 package. I tried to open an application using Python, however I am facing an error: "invalid class string".

Code:

import win32com.client as win32
ecutest = win32.Dispatch('ECU-TEST 7.2.Application')

Error:

Traceback (most recent call last):
  File "C:\Users\Halos\AppData\Local\Programs\Python\Python310\lib\site-packages\win32com\client\dynamic.py", line 86, 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 "C:\Users\Halos\Desktop\ECU_Test_Run.py", line 2, in <module>
    ecutest = win32.Dispatch('ECU-TEST 7.2.Application')
  File "C:\Users\Halos\AppData\Local\Programs\Python\Python310\lib\site-packages\win32com\client\__init__.py", line 117, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName, clsctx)
  File "C:\Users\Halos\AppData\Local\Programs\Python\Python310\lib\site-packages\win32com\client\dynamic.py", line 106, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Users\Halos\AppData\Local\Programs\Python\Python310\lib\site-packages\win32com\client\dynamic.py", line 88, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source