Getting Error while creating status in shotgun using python shotgun api

882 Views Asked by At

I am using shotgun python api to create,delete,update in shotgun but i am getting error can anyone solve this ?

import shotgun_api3

shot = sg.create("Status",{"code":"Done1","name":"new1","icon":"Active"})

print shot

Error

Fault: API create() Status.icon expected [Hash, NilClass] data type(s) but got 
String:"Active"
2

There are 2 best solutions below

0
On

You try delete : ,"icon":"Active"

import shotgun_api3

shot = sg.create("Status",{"code":"Done1","name":"new1"})

print shot
0
On

proj_id = 1234 status_name = "New1"

status_entity = { "project": {"type": "Project", "id": proj_id}, "code": status_name }

_shot = sg.create("Status", status_entity)