Batchdelivery nuke_template_processing does not run with Nuke14/Py3.9

The script “nuke_template_processor.py” fails with

stderr: Traceback (most recent call last): File "C:/Users/brandhuber/AppData/Local/Ynput/AYON/addons/batchdelivery_0.4.2/ayon_batchdelivery/scripts/nuke_template_processor.py", line 229, in <module> def get_upstream_colorspace_data(start_node) -> dict[str, str] | None: TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'

when run with Nuke 14.1v2, because its python version 3.9.10 does not support using the bitwise OR operator (|) for union type hinting.

Adding this line

from __future__ import annotations

on top of the code fixed the problem and the delivery processes as expected.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
🐛

Bugs

Author

Sebastian Brandhuber

Subscribe to post

Get notified by email when there are changes.