In order to check if TM1py can connect to your TM1 instance, you can use the check.py Python script from the samples. First download the samples from Github and then 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.
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)
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.
If this does not work you should check:
Double check your credentials as the CAM Namespace is case sensitive
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!