TM1 - Connection Error

Post Reply
Andre@s
Posts: 2
Joined: Thu May 07, 2020 2:55 pm
OLAP Product: Cognos
Version: 2.0
Excel Version: 365

TM1 - Connection Error

Post by Andre@s »

Hello Community,

I am struggling connection to TM1 with python TM1py.

Failure Message:
TM1pyException: Text: Status Code: 401 Reason: Unauthorized Headers: {'Content-Type': 'text/plain', 'Content-Length': '0', 'Connection': 'keep-alive', 'Set-Cookie': 'TM1SessionId=anysession_id; Path=/api/; HttpOnly; Secure', 'WWW-Authenticate': 'CAMPassport http://anyserveraddress:9300/bi/v1/disp, CAMNamespace'}
Code I am using:

Code: Select all

import configparser

config = configparser.ConfigParser()
config.read('config.ini')

from TM1py.Objects import Dimension, Element, ElementAttribute, Hierarchy
from TM1py import TM1Service
tm1 = TM1Service(**config['Tm1server'])
Config used for test:
[Tm1server]
address=anyserveraddress
port=8888
user=admin
password=apple
gateway=
ssl=True

What does it mean to have an Unauthorized Header?
Thanks for your help!

BR Andreas
User avatar
Elessar
Community Contributor
Posts: 412
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: TM1 - Connection Error

Post by Elessar »

Hi,

What is IntegratedSecurityMode in tm1s.cfg? Admin+Apple usually stands for 1, but CAM is 4 or 5.
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 10th article - AI has failed TM1 Quiz.
Andre@s
Posts: 2
Joined: Thu May 07, 2020 2:55 pm
OLAP Product: Cognos
Version: 2.0
Excel Version: 365

Re: TM1 - Connection Error

Post by Andre@s »

Hello Elessar,

thanks for your reply!

I checked again and problem is solved.

Issue was the missing and wrongly spelled CAMNamespace.
Topic can be closed.

Thanks!
Have a nice weekend!
Andreas
Post Reply