cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
187 stars 107 forks source link

Unable to connect tm1phy on IBM Cloud #1097

Closed mziedbhmida closed 5 months ago

mziedbhmida commented 5 months ago

Hi all,

Hope you are doing well!

I'm trying to connect to a tm1 database named "SKU" on cloud, so I have this code:

`from TM1py import TM1Service

params = { "base_url": "https://XXXXXXX.planning-analytics.ibmcloud.com/tm1/api/SKU/", "user": "zied.XXXXX", "password": "%%%%%%%", "async_requests_mode": True, "ssl": True, "verify": True }

with TM1Service(**params) as tm1: print(tm1.server.get_product_version())`

When I run the code I get this response:

TM1pyRestException: Text: '' - Status Code: 401 - Reason: 'Unauthorized'

Version TM1py 3.12.2 TM1 Server Version: 2.0.94

Any ideas what I'm doing wrong? Thank you in advance,

Zied

MariusWirtz commented 5 months ago

Are you using the non-interactive account?

mziedbhmida commented 5 months ago

Hi Marius,

Thank you for your reply, this is what the IBM support told me,

I'll try with the non-interactive account :)

best regards, Zied

mziedbhmida commented 5 months ago

Hi Marius,

this me again, it works !!

Thanks Zied