shotgunsoftware / tk-multi-breakdown2

A Flow Production Tracking Pipeline Toolkit app that helps you see what is out of date in your scene across multiple projects.
https://developer.shotgridsoftware.com/tk-multi-breakdown2/
Other
4 stars 10 forks source link

Error when PublishedFile is not linked to a Task #50

Closed blambright closed 10 months ago

blambright commented 1 year ago

We have a couple PublishedFile entities that aren't linked to a Task (only an Asset or Shot). If any of those PublishedFile entities are loaded into a scene, the scene breakdown breaks (shows up empty).

This is due to the filter for task being ["task", "is", None]

Traceback (most recent call last):
  File ".../install/app_store/tk-framework-shotgunutils/v5.8.5/python/task_manager/worker_thread.py", line 82, in run
    result = task_to_process.run()
  File ".../install/app_store/tk-framework-shotgunutils/v5.8.5/python/task_manager/background_task.py", line 139, in run
    return self._cbl(*self._args, **self._kwargs)
  File ".../install/app_store/tk-framework-shotgunutils/v5.8.5/python/shotgun_data/shotgun_data_retriever.py", line 1108, in _task_execute_find
    sg_res = self._bundle.shotgun.find(*args, **kwargs)
  File ".../install/core/python/tank_vendor/shotgun_api3/shotgun.py", line 1000, in find
    result = self._call_rpc("read", params)
  File ".../install/core/python/tank/authentication/shotgun_wrapper.py", line 63, in _call_rpc
    return super(ShotgunWrapper, self)._call_rpc(*args, **kwargs)
  File ".../install/core/python/tank_vendor/shotgun_api3/shotgun.py", line 3360, in _call_rpc
    self._response_errors(response)
  File ".../install/core/python/tank_vendor/shotgun_api3/shotgun.py", line 3665, in _response_errors
    raise Fault(sg_response.get("message", "Unknown Error"))
tank_vendor.shotgun_api3.shotgun.Fault: API read() CRUD ERROR #10: Read failed for entity type [PublishedFile]
rob-aitchison commented 1 year ago

Hello @blambright , Thanks for logging this. Can you please confirm the version of tk-multi-breakdown2 you are using in your config and which Engine generated this error?

blambright commented 1 year ago

Sorry for the delayed response. Just got back from vacation.

Versions:

I was initially incorrect in the description. The issue is coming from this line:

When the task is unset, the filter in the query looks like this:

["task", "in", [None]],

Can reproduce the error by running this code:

self.sgtk.shotgun.find_one("PublishedFile", [["task", "in", [None]]])

Raises the same error:

shotgun_api3.shotgun.Fault: API read() CRUD ERROR #10: Read failed for entity type [PublishedFile]
rob-aitchison commented 1 year ago

Hello @blambright , Thanks for this follow-up, we have just logged this internally for investigation, cheers!