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

Nuke: fixing unicode type detection in effect loaders #3002

Merged
merged 2 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openpype/hosts/nuke/plugins/load/load_effects.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
from collections import OrderedDict
import nuke
import six

from avalon import io

Expand Down Expand Up @@ -333,7 +334,7 @@ def byteify(self, input):
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, str):
elif isinstance(input, six.text_type):
return str(input)
else:
return input
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/nuke/plugins/load/load_effects_ip.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from collections import OrderedDict

import six
import nuke

from avalon import io
Expand Down Expand Up @@ -353,7 +353,7 @@ def byteify(self, input):
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, str):
elif isinstance(input, six.text_type):
return str(input)
else:
return input
Expand Down
6 changes: 3 additions & 3 deletions openpype/hosts/nuke/plugins/load/load_gizmo_ip.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import nuke

import six
from avalon import io

from openpype.pipeline import (
Expand Down Expand Up @@ -243,8 +243,8 @@ def byteify(self, input):
for key, value in input.items()}
elif isinstance(input, list):
return [self.byteify(element) for element in input]
elif isinstance(input, unicode):
return input.encode('utf-8')
elif isinstance(input, six.text_type):
return str(input)
else:
return input

Expand Down