[python-win32] Facing issue while connecting to alm via python
Neeraj Chhabra
neerajchhabrascs at gmail.com
Mon Jan 28 23:25:38 EST 2019
Hi team,
I have one requirement, in which i need to connect to HP ALM and log a
defect in jira using python. i tried to connect to alm through pywin32. but
getting error. please check below code snippet and error -
*code -*
import win32com
from win32com.client import Dispatch
qcServer = ""
qcUser = ""
qcPassword = ""
qcDomain = ""
qcProject = ""
td = win32com.client.Dispatch("TDApiOle80.TDConnection.1")
#Starting to connect
td.InitConnectionEx(qcServer)
td.Login(qcUser, qcPassword)
td.Connect(qcDomain, qcProject)
if td.Connected is True:
print("Connected to " + qcProject)
else:
print("Connection failed")
*Error* -
IDispatch = pythoncom.connect(IDispatch)
pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Ajit_Mallick/PycharmProjects/Test/almcon.py", line
11, in <module>
td = win32com.client.Dispatch("TDApiOle80.TDConnection.1")
File "C:\Users\Ajit_Mallick\PycharmProjects\Test\venv\lib\site-packages\win32com\client\__init__.py",
line 95, in Dispatch
dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Users\Ajit_Mallick\PycharmProjects\Test\venv\lib\site-packages\win32com\client\dynamic.py",
line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Users\Ajit_Mallick\PycharmProjects\Test\venv\lib\site-packages\win32com\client\dynamic.py",
line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221164, 'Class not registered', None, None)
Process finished with exit code 1
Regards,
Neeraj Chhabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20190129/694d0bc7/attachment.html>
More information about the python-win32
mailing list