Bug with tk-multi-breakdown v0.2.8

Hi,

I have opened a ticket for this issue on the autodesk support, like it should be done, months ago. At that point in time the same bug was occuring with v0.2.7 of the app. I created a ticket, but 1/ this is not fixed in v0.2.8 and 2/ I can’t even look at my support case on the autodesk support site.

Anyway, I’m posting it here, hoping to get some eyes of the shotgrid devs on it.

I’m updating my shotgrid toolkit config and I updated tk-multi-breakdown to v0.2.8. I get error messages when using it in Nuke.

My config :
workstation : Windows10
tk-core v0.20.26
tk-framework-shotgunutils_v5.x.x : v5.8.7
tk-framework-qtwidgets_v2.x.x: : v2.10.8

NukeX 13.2v4 using tk-nuke v0.14.7

STEPS :

I open a shot in Nuke with a read node (published file). I launch the Scene Breakdown tool (tk-multi-breakdown2 v0.2.8). The UI opens, stays empty (ie no published file appear in the main scene breakdown window). Nuke’s console shows these lines :


[DEBUG tk-framework-shotgunutils] Initialized settings manager for 'tk-multi-breakdown2'
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving auto_refresh
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving dynamic_loading
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving group_by
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'None'): '{self}/ui_config_advanced.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config_advanced.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'None'): '{self}/ui_config_advanced.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config_advanced.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving view_mode
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving view_item_list_size_scale
[DEBUG tk-framework-shotgunutils] User Settings Manager: Storing view_item_list_size_scale
[DEBUG tk-framework-shotgunutils] User Settings Manager: Storing view_mode
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'None'): '{self}/ui_config_advanced.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config_advanced.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_ui_config'): '{self}/ui_config.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\ui_config.py']
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving details_panel_visibility
[DEBUG tk-framework-shotgunutils] User Settings Manager: Storing details_panel_visibility
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving splitter_state
[WARNING tk-framework-shotgunutils] Error retrieving value for stored user setting 'splitter_state' - reverting to to default value. Error details: 'utf-8' codec can't decode byte 0xff in position 3: invalid start byte
[DEBUG tk-framework-shotgunutils] User Settings Manager: Retrieving filter_menu_state
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'None'): '{config}/tk-multi-breakdown2/tk-nuke_scene_operations.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\config\\hooks\\tk-multi-breakdown2\\tk-nuke_scene_operations.py']
[DEBUG tk-nuke] Detected std style sheet file '\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\style.qss' - applying to widget <tank.platform.qt.tankqdialog.__AppDialog_TkWidgetWrapper__ object at 0x0000023AA52016C8>
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_scene_operations'): '{config}/tk-multi-breakdown2/tk-nuke_scene_operations.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\tk-nuke_scene_operations.py', '\\\\VSERVER01\\shotgun\\devdo2023\\config\\hooks\\tk-multi-breakdown2\\tk-nuke_scene_operations.py']
[DEBUG manager] scan_scene: 0.016526s
[DEBUG tk-framework-shotgunutils] Task Manager: Started new background worker thread (num threads=1)
[DEBUG manager] get_published_files_from_file_paths: 0.001002s
[DEBUG connection] Creating SG connection from <SessionUser donat @ https://nozon.shotgunstudio.com>...
[DEBUG connection] create_sg_connection: 0.001000s
[DEBUG publish_creation] Split up path '\\sledge\vol1\Projects\devdo2023\Shots\newschema\sh001\Sources\plate\newschema_sh001_plate_v001\newschema_sh001_plate_ACEScg_v001.%04d.exr' into storage secondary and relative path 'devdo2023/Shots/newschema/sh001/Sources/plate/newschema_sh001_plate_v001/newschema_sh001_plate_ACEScg_v001.%04d.exr'
[DEBUG storage_roots] Attempting to associate required storage roots with SG local storages...
[DEBUG storage_roots] Querying SG local storages...
[DEBUG storage_roots] Query returned 3 storages.
[DEBUG storage_roots] Storage root primary explicitly associated with SG local storage id 1 ({'type': 'LocalStorage', 'id': 1, 'code': 'primary', 'windows_path': '\\\\server01\\shared2\\projects', 'linux_path': '/mnt/shared2/projects', 'mac_path': '/Volumes/shared2/projects'})
[DEBUG storage_roots] Storage root secondary explicitly associated with SG local storage id 2 ({'type': 'LocalStorage', 'id': 2, 'code': 'secondary', 'windows_path': '\\\\sledge\\vol1\\Projects', 'linux_path': '/mnt/vol1/Projects', 'mac_path': '/Volumes/vol1/Projects'})
[DEBUG publish_util] find_publish: 1.618055s
[DEBUG bundle] <Sgtk App 0x23a2b553dc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23a2b511d88: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_get_published_files'): '{config}/tk-multi-breakdown2/get_published_files.py' -> ['\\\\VSERVER01\\shotgun\\devdo2023\\install\\app_store\\tk-multi-breakdown2\\v0.2.8\\hooks\\get_published_files.py', '\\\\VSERVER01\\shotgun\\devdo2023\\config\\hooks\\tk-multi-breakdown2\\get_published_files.py']
[DEBUG tk-framework-shotgunutils] Task Manager: Started new background worker thread (num threads=2)
[DEBUG connection] Creating SG connection from <SessionUser donat @ https://nozon.shotgunstudio.com>...
[DEBUG connection] create_sg_connection: 0.001001s
[DEBUG file_item_model] _build_model_from_file_items: 0.000000s
Traceback (most recent call last):
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-framework-qtwidgets\v2.10.8\python\models\hierarchical_filtering_proxy_model.py", line 292, in filterAcceptsRow
    src_idx = src_model.index(src_row, 0, src_parent_idx)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 350, in index
    return self.createIndex(row, column, child_item)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 335, in createIndex
    return super(FileTreeItemModel, self).createIndex(row, column, ptr_id)
OverflowError: Python int too large to convert to C unsigned long
Traceback (most recent call last):
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-framework-qtwidgets\v2.10.8\python\models\hierarchical_filtering_proxy_model.py", line 292, in filterAcceptsRow
    src_idx = src_model.index(src_row, 0, src_parent_idx)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 350, in index
    return self.createIndex(row, column, child_item)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 335, in createIndex
    return super(FileTreeItemModel, self).createIndex(row, column, ptr_id)
OverflowError: Python int too large to convert to C unsigned long
Traceback (most recent call last):
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\dialog.py", line 1143, in _on_file_model_reset_end
    self._expand_all_groups()
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\dialog.py", line 1326, in _expand_all_groups
    index = self._file_model.index(row, 0)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 350, in index
    return self.createIndex(row, column, child_item)
  File "\\VSERVER01\shotgun\devdo2023\install\app_store\tk-multi-breakdown2\v0.2.8\python\tk_multi_breakdown2\file_item_model.py", line 335, in createIndex
    return super(FileTreeItemModel, self).createIndex(row, column, ptr_id)
OverflowError: Python int too large to convert to C unsigned long

If I revert back to using tk-multi-breakdown v0.2.4 I have no problem, the tool works as expected, I see the published file and can update my read nodes.

I put a print in the file_item_model.py before the line 336. The value of variable ‘ptr_id’ is: 2449932849352 (class : int)

Can someone from SG please have a look into this issue ?

Thanks

Hi @donat - what version of Python are you running?

Hi oues,

In my case, this bug occurs in Nuke 13.2v4, which uses Python 3.7.7 (to be complete : 3.7.7 (remotes/origin/foundry/v3.7.7:7469179062, Aug 23 2022, 12:52:21) [MSC v.1916 64 bit (AMD64)]

Hi @donat - I have a branch with a fix for this, feel free to try this out and let me know if you still experience the same issue.

2 Likes

Hi @oues

I tested your branch fix and it works, thanks very much. Waiting for an official new release then

As a sidenote, I also had another unrelated bug with breakdown2, since version v0.2.5 :
Trying to do a scene breakdown on published files that have no task associated was not functioning (see support case : CaseNo:20859362). I was given a workaround for it : I’ve changed the get_published_files hook :

    # Published files will be found by their entity, name, task and published file type.
    filters = [
        ["entity", "in", entities],
        ["name", "in", names],
        # ["task", "in", tasks],  #### Causes problem for published files with no associated task
        ["published_file_type", "in", pf_types],
    ]

As you see, I had to comment out a line. In breakdown2 versions < 0.2.4, that was not an issue.

Hi @donat - glad that worked for you :+1:

For showing Published Files with no Task, please try out this branch. The default will filter by Published Files with a Task, so you will need to add the new config setting in tk-multi-breakdown2.yml for your engine to override the Published File filter. For example:

settings.tk-multi-breakdown2.nuke:
  hook_scene_operations: '{self}/tk-nuke_scene_operations.py'
  published_file_filters: []
  location: "@apps.tk-multi-breakdown2.location"

Hi @oues ,

I tried your other branch (SHOT-4280/fix-get-published-files), but there I still have the original issue

Python int too large to convert to C unsigned long

So I guess I’ll wait for these two fixes to be merged and committed.

Thanks

Hi @donat - I have created a new branch for testing that includes all changes for next release:

Hi @oues

I tried branch v0.2…9-rc in Nuke, on a single published file with no associated task and got this error :

[DEBUG publish_util] find_publish: 1.425756s
[DEBUG bundle] <Sgtk App 0x23b3184fbc8: tk-multi-breakdown2, engine: <Sgtk Engine 0x23b3182c5c8: tk-nuke, env: shot_step>>: Resolved hook expression (associated with setting 'hook_get_published_files'): '{self}/get_published_files.py' -> ['\\\\VSERVER01\\shotgun\\donatdev2024\\install\\gitbranch\\tk-multi-breakdown2.git\\58b456a\\hooks\\get_published_files.py']
[DEBUG tk-framework-shotgunutils] Task Manager: Started new background worker thread (num threads=2)
[DEBUG connection] Creating SG connection from <SessionUser donat @ https://nozon.shotgunstudio.com>...
[DEBUG connection] create_sg_connection: 0.001001s
[DEBUG tk-framework-shotgunutils] Task Manager: Task [1, G:1, P:30] _task_execute_find - failed: API read() 'in' 'relation' expects at least a 1-element array:
[]
Traceback (most recent call last):
  File "\\VSERVER01\shotgun\donatdev2024\install\app_store\tk-framework-shotgunutils\v5.8.7\python\task_manager\worker_thread.py", line 82, in run
    result = task_to_process.run()
  File "\\VSERVER01\shotgun\donatdev2024\install\app_store\tk-framework-shotgunutils\v5.8.7\python\task_manager\background_task.py", line 139, in run
    return self._cbl(*self._args, **self._kwargs)
  File "\\VSERVER01\shotgun\donatdev2024\install\app_store\tk-framework-shotgunutils\v5.8.7\python\shotgun_data\shotgun_data_retriever.py", line 1108, in _task_execute_find
    sg_res = self._bundle.shotgun.find(*args, **kwargs)
  File "\\VSERVER01\shotgun\donatdev2024\install\core\python\tank_vendor\shotgun_api3\shotgun.py", line 1057, in find
    result = self._call_rpc("read", params)
  File "\\VSERVER01\shotgun\donatdev2024\install\core\python\tank\authentication\shotgun_wrapper.py", line 63, in _call_rpc
    return super(ShotgunWrapper, self)._call_rpc(*args, **kwargs)
  File "\\VSERVER01\shotgun\donatdev2024\install\core\python\tank_vendor\shotgun_api3\shotgun.py", line 3423, in _call_rpc
    self._response_errors(response)
  File "\\VSERVER01\shotgun\donatdev2024\install\core\python\tank_vendor\shotgun_api3\shotgun.py", line 3740, in _response_errors
    raise Fault(sg_response.get("message", "Unknown Error"))
tank_vendor.shotgun_api3.shotgun.Fault: API read() 'in' 'relation' expects at least a 1-element array:
[]

Traceback (most recent call last):
  File "\\VSERVER01\shotgun\donatdev2024\install\gitbranch\tk-multi-breakdown2.git\58b456a\python\tk_multi_breakdown2\file_item_model.py", line 1539, in _on_background_task_failed
    raise Exception(msg)
Exception: API read() 'in' 'relation' expects at least a 1-element array:
[]
Traceback (most recent call last):
  File "\\VSERVER01\shotgun\donatdev2024\install\gitbranch\tk-multi-breakdown2.git\58b456a\python\tk_multi_breakdown2\file_item_model.py", line 1495, in _on_data_retriever_work_failed
    raise Exception(error_msg)
Exception: API read() 'in' 'relation' expects at least a 1-element array:
[]
[DEBUG filter_definition] build: 0.000000s
[DEBUG filter_definition] update_filters: 0.000000s
[DEBUG filter_menu] _build_menu_widgets: 0.001001s
[DEBUG filter_definition] update_filters: 0.000000s
[DEBUG filter_menu] _refresh_menu_widgets: 0.000000s
[DEBUG filter_menu] refresh: 0.004004s

If I try on a published file that has an associated, it works.

My breakdown config for Nuke :


settings.tk-multi-breakdown2.nuke:
  panel_mode: False
  hook_scene_operations: "{config}/tk-multi-breakdown2/tk-nuke_scene_operations.py"
  published_file_filters: []
  location: "@apps.tk-multi-breakdown2.location"

Hi @donat - sorry there was a merge conflict in creating the branch. Please pull the latest change, and try again.

Hi,

Yes, now it works fine, thanks