shotgunsoftware / tk-multi-importcut

Import Cut app
Other
0 stars 0 forks source link

Bug: Removing duplicated shot from previously published cut causes crash #73

Open brycegbrazen opened 1 month ago

brycegbrazen commented 1 month ago

When a single shot is present multiple times in a single cut publish, and then you remove one instance of that shot from a following cut publish, a crash occurs.

For example:

Let's say you had a shot named 0300_0110 in the cut twice in your v039 publish, and then in v040, you removed one of those duplicates, so only 1 instance of that shot was present.

The code basically marks both of these changes as a "Cut Change" which assumes that there would be a "new_cut_order" set for both of the cut items. However, the duplicate that was removed had NoneType as the "new_cut_order" because it was removed from the EDL, and when compared to a "int", a crash occurs.

The relevant code is:

Here is an image of the error: image

And here is the associated traceback error:

  File "C:\Program Files\ShotGrid\RV-2022.0.0\src\python\sgtk\baked\plugin\bundle_cache\app_store\tk-multi-importcut\v2.4.0\python\tk_multi_importcut\edl_cut.py", line 1102, in do_cut_import
    title, sender, to, description, sg_links=[self._sg_new_cut]

  File "C:\Program Files\ShotGrid\RV-2022.0.0\src\python\sgtk\baked\plugin\bundle_cache\app_store\tk-multi-importcut\v2.4.0\python\tk_multi_importcut\edl_cut.py", line 1142, in create_note
    subject, body = summary.get_report(title, url_links)

  File "C:\Program Files\ShotGrid\RV-2022.0.0\src\python\sgtk\baked\plugin\bundle_cache\app_store\tk-multi-importcut\v2.4.0\python\tk_multi_importcut\cut_summary.py", line 915, in get_report
    key=lambda x: x.new_cut_order,

This seems to be present in the latest tk-multi-importcut as well, which is currently v2.5.0

julien-lang commented 3 weeks ago

Hi @brycegbrazen, thanks for this report. Could you raise this issue on Autodesk support, please?

brycegbrazen commented 3 weeks ago

Rodger that. I've created a support ticket and referenced this issue if they need more details there.