Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TM1py.Exceptions.Exceptions.TM1pyRestException: Text: '' - Status Code: 401 - Reason: 'Unauthorized' #1226

Open
winsonlee8 opened this issue Feb 17, 2025 · 0 comments
Labels

Comments

@winsonlee8
Copy link

winsonlee8 commented Feb 17, 2025

Describe what did you try to do with TM1py

The username listed below able to connect to PAW and ARC without issue. When i try running below to connect to tm1 server, it is giving the error message. what could be the issue ?

with TM1Service(address="SERVER.global.corp", port=8864, ssl=True, user="[email protected]", password="password", namespace="AD") as tm1: print(tm1.server.get_product_version())

Describe what's not working the way you expect
Traceback (most recent call last): File "D:\TM1Models\TM1_Prd\Scripts\tm1_SetAccountCreds.py", line 75, in <module> SetCreds() File "D:\TM1Models\TM1_Prd\Scripts\tm1_SetAccountCreds.py", line 70, in SetCreds with TM1Service(**config[INSTANCE]) as tm1: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\Python312\Lib\site-packages\TM1py\Services\TM1Service.py", line 64, in __init__ self._tm1_rest = RestService(**kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\Python312\Lib\site-packages\TM1py\Services\RestService.py", line 183, in __init__ self.connect() File "D:\Program Files\Python312\Lib\site-packages\TM1py\Services\RestService.py", line 331, in connect self._start_session( File "D:\Program Files\Python312\Lib\site-packages\TM1py\Services\RestService.py", line 749, in _start_session self.verify_response(response) File "D:\Program Files\Python312\Lib\site-packages\TM1py\Services\RestService.py", line 886, in verify_response raise TM1pyRestException(response.text, TM1py.Exceptions.Exceptions.TM1pyRestException: Text: '' - Status Code: 401 - Reason: 'Unauthorized' - Headers: {'Content-Type': 'text/plain', 'Content-Length': '0', 'Connection': 'keep-alive', 'Set-Cookie': 'TM1SessionId=v5RDPAaU9T5LkzGnr0o2eCCcXmg; Path=/api/; HttpOnly; Secure', 'WWW-Authenticate': 'CAMPassport https://CAMSERVER.global.corp:9300/bi/v1/disp, CAMNamespace'}

Version

  • Python 3.12
  • TM1py 2.0.4
  • TM1 Server Version: 2.1.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant