无法使用python登录到ALM

无法使用python登录到ALM,python,alm,Python,Alm,我正在尝试登录到ALM并通过python代码获取所有缺陷。 但我无法登录 import win32com.client import win32api import pythoncom def get_QCConnection(): '''Get the hardcoded connection to the server and domain. Can be made a "real" engine if you try hard. Use makepy utility

我正在尝试登录到ALM并通过python代码获取所有缺陷。 但我无法登录

import win32com.client
import win32api
import pythoncom
def get_QCConnection():
    '''Get the hardcoded connection to the server and domain.
    Can be made a "real" engine if you try hard.
    Use makepy utility to determine if the version number has changed (TDApiOle80)
    but this works to current version'''

    QCConnection =win32com.client.Dispatch("TDApiOle80.TDConnection")
    url = 'http://alm12ypdmz:8080/qcbin'
    QCConnection.InitConnectionEx(url)
    QCConnection.login('msb','Welcome*01')
    QCConnection.Connect('DEFAULT','NEWGEN_SYS_TEST')    
    return QCConnection
conn = get_QCConnection()

com_错误:(-2147221164,‘类未注册’,无,无)

改用RESTAPI。这将是非常重要的easy@Barney如果你有样本代码,你能帮我吗?因为我是新手。请查看:RESTAPI端点列表:改用RESTAPI。这将是非常重要的easy@Barney如果你有样本代码,你能帮我吗?因为我是新手。请查看以下内容:REST API端点列表: