Connecting to TM1 via Python, Where to find "Address" and "Port" Arguments

442 Views Asked by At

I am trying to connect to IBM TM1 via a Pythonscript. However I am not sure how to configure the Address and Port parts of my script below.

I am running python on a work pc. I did create a file with a proxy address in order to install a python package.

Does anyone know how to find the address and port?

from TM1py.Services import TM1Service

        
with TM1Service(address='localhost', port=8001, user='excelguy', password='WordPass', ssl=True) as tm1:
    content = tm1.cubes.cells.get_view_content(cube_name='Stack', view_name='OverFlow', private=False)
    print(content)

I am getting the error message:

ConnectionError: HTTPSConnectionPool(host='localhost', port=8001): Max retries exceeded with url: /api/v1/Configuration/ProductVersion/$value (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000263C25C7A88>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

I think I am getting closer, getting a new error msg after getting the address and port from admin.

SSLError: HTTPSConnectionPool(host='host', port=port): Max retries exceeded with url: /api/v1/Configuration/ProductVersion/$value (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')")))
0

There are 0 best solutions below