Hello, I'm trying to create an user with the following script but didn't work. Any help on what I did wrong would be appreciated, thank you.
from TM1py.Objects import User
from TM1py.Services import TM1Service
import configparser
config = configparser.ConfigParser()
config.read(r'ConfigDemo.ini')
with TM1Service(**config['ServerA']) as tm1:
u1 = User(name="test", groups=["ADMIN"], password= "test")
tm1.security.create_user(u1)
I got the following error:
TM1py.Exceptions.Exceptions.TM1pyException: Text: {"error":{"code":"278","message":"Unexpected value type encountered in the payload while processing \"User\". Expecting type \"String\" but was \"Null\"."}} Status Code: 400 Reason: Bad Request
Hi @luizg2018,
for me the script runs without errors.
Please try to upgrade to the latest version of TM1py (= the current master branch on GitHub).
To upgrade you can execute this:
pip install https://github.com/cubewise-code/tm1py/archive/master.zip --upgrade
Hi @luizg2018,
for me the script runs without errors.
Please try to upgrade to the latest version of TM1py (= the current master branch on GitHub).
To upgrade you can execute this:
pip install https://github.com/cubewise-code/tm1py/archive/master.zip --upgrade
I'm embarrassed, I was sure I was using the latest version. I upgraded it and it worked. Thank you for you help!!!