Closed TM1pylearner closed 4 months ago
Hi TM1pylearner, could you try a couple of things.
Make sure the namespace is in the correct case ( it is case sensitive) Remove the gateway option in the call (as per below)
with TM1Service( address=address, port=port, user=user, password=password, namespace=namespace, ssl=ssl ) as tm1:
Good reference is here. https://code.cubewise.com/blog/how-to-authenticate-to-tm1-with-tm1py/
Hope this gets you going
We are trying to run one of the sample code to check the system name and the we are getting the error as unauthorized. Below is the code that we are trying and the error that we are getting. We have installed python in one of our server. We tried replacing the company address with local host but didnot work. We donot have SSo configured but a different namespace in our cognos configuration. The test user has admin access in the application. Can someone help us with this connection errors. Thank you
ERROR Text: '' - Status Code: 401 - Reason: 'Unauthorized' - Headers: {'Content-Type': 'text/plain', 'Content-Length': '0', 'Connection': 'keep-alive', 'Set-Cookie': 'TM1SessionId=e0dMOe1jHlXLJMkXVjRUfZ4OXjg; Path=/api/; HttpOnly; Secure', 'WWW-Authenticate': 'CAMPassport https://Company.address:9300/bi/v1/disp, CAMNamespace'}