In order to check if TM1py can connect to your TM1 instance, navigate to the TM1py-samples folder that you downloaded from Github, in this example the samples are located in the following folder:
Hold shift and right-click in the folder. Then select "Open command window here". This should open the command-line (or PowerShell depending on your Windows version). Now type "python check.py" into the console to execute the check.py script.
- python check.py
The script will ask you for:
- TM1 User (Name of the TM1 User)
- Password (The user's password. The command-line reads your input silently)
- CAM Namespace:
- Port (The HTTPPortNumber as specified in the TM1s.cfg)
- address (Address of the TM1 instance. 'localhost' or '' if you run the TM1 instance locally)
- ssl (True or False, as stated in the TM1s.cfg)
TM1py will then try to connect to your TM1 instance.
It will print out the name of the TM1 instance. If this works without Errors you should be able run any of the samples.
All the samples are based on the Planning Sample TM1 model, that comes with the installation of TM1. The samples potentially contain hard coded references to TM1 objects (e.g. cube names). Make sure to adjust those references if you are not testing against the Planning Sample!