Updating packages of versioned code environments throught the API
![binary_wader](https://us.v-cdn.net/6038231/uploads/defaultavatar/nBZFMHJY3ZB3C.jpg)
binary_wader
Registered Posts: 1 ✭
I am working on a script which pulls up each code environment from the automation node and do a package update. When I run the script I am getting this version error, after get the latest version of the code env, update package() doesn't have an parameter for code version. How to specify a version in update_packages() ?
Code
client = dataikuapi.DSSClient("DEV_URL", api_key="API_KEY")
client._session.verify = False
test_code_env_name = 'Python_39_test'
test_code_env_handle = client.get_code_env('PYTHON',test_code_env_name)
test_code_env_flag = test_code_env_handle.update_packages(force_rebuild_env=False)
print(test_code_env_flag)
Error (O/P of print)
Exception: Env update failed : [{"severity": "ERROR", "isFatal": true, "code": "ERR_CODEENV_UPDATE_FAILED", "title": "Environment update failed", "details": "Version not specified", "message": "Environment update failed: Version not specified"}]
Operating system used: Windows
Tagged: