Hello,
I am discovering shotgun api and stuck in a basic issue
proj_filter = ['project', 'is', ctx.project]
assets = sg.find("Asset" , [proj_filter] , ['code', 'sg_asset_type'])
this code works as expected
proj_filter = [['project', 'is', ctx.project],['sg_asset_type', 'is' ,'character']]
assets = sg.find("Asset" , [proj_filter] , ['code', 'sg_asset_type'])
This one gives me this error :
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/s/apps/packages/mikrosVfx/vfxTkCore/0.20.16.mikros.1.3/studio/install/core/python/tank_vendor/shotgun_api3/shotgun.py", line
1034, in find
result = self._call_rpc("read", params)
File "/s/apps/packages/mikrosVfx/vfxTkCore/0.20.16.mikros.1.3/studio/install/core/python/tank_vendor/shotgun_api3/shotgun.py", line
3394, in _call_rpc
self._response_errors(response)
File "/s/apps/packages/mikrosVfx/vfxTkCore/0.20.16.mikros.1.3/studio/install/core/python/tank_vendor/shotgun_api3/shotgun.py", line
3711, in _response_errors
raise Fault(sg_response.get("message", "Unknown Error"))
tank_vendor.shotgun_api3.shotgun.Fault: API read() invalid/missing filters string 'relation' (simple condition):
{"path"=>
"[\"project\", \"is\", {\"name\"=>\"VFX Sandbox\", \"id\"=>181, \"type\"=>\"Project\"}]",
"relation"=>["sg_asset_type", "is", "character"],
"values"=>[]}
When watch the doc I canât figure whatâs wrong
https://developers.shotgridsoftware.com/python-api/reference.html#filter-syntax
Thanks for your help