Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Ftrack: Action delete old versions formatting works #3152

Merged
merged 1 commit into from
May 9, 2022

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Fixed formatting of representation path with frames.

Description

Arguments for StringTemplate were swapped which caused a crash.

Testing notes:

  1. Run the action from Ftrack on representation with frames
  2. Action should delete files without any issues

Traceback

==============================
<StringTemplate> argument must be a string, not <class 'dict'>.
==============================
Traceback (most recent call last):
  File "/some_root/openpype/modules/ftrack/lib/ftrack_base_handler.py", line 137, in wrapper_launch
    return func(*args, **kwargs)
  File "/some_root/openpype/modules/ftrack/event_handlers_user/action_delete_old_versions.py", line 310, in launch
    file_path, seq_path = self.path_from_represenation(repre, anatomy)
  File "/some_root/openpype/modules/ftrack/event_handlers_user/action_delete_old_versions.py", line 572, in path_from_represenation
    context, template
  File "/some_root/openpype/lib/path_templates.py", line 197, in format_strict_template
    objected_template = cls(template)
  File "/some_root/openpype/lib/path_templates.py", line 93, in __init__
    self.__class__.__name__, str(type(template))
TypeERROR: <StringTemplate> argument must be a string, not <class 'dict'>.

@iLLiCiTiT iLLiCiTiT self-assigned this May 6, 2022
@iLLiCiTiT iLLiCiTiT added type: bug Something isn't working module: Ftrack labels May 6, 2022
@iLLiCiTiT iLLiCiTiT requested review from 64qam, kalisp and mkolar May 6, 2022 14:31
@iLLiCiTiT iLLiCiTiT merged commit e078833 into develop May 9, 2022
@iLLiCiTiT iLLiCiTiT deleted the bugfix/ftrack_delete_versions_variables_order branch May 9, 2022 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
module: Ftrack type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants