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

Commit

Permalink
Merge pull request #3002 from pypeclub/bugfix/nuke12-unicode-error-ef…
Browse files Browse the repository at this point in the history
…fect-loaders

Nuke: fixing unicode type detection in effect loaders
  • Loading branch information
jakubjezek001 authored Apr 4, 2022
2 parents f58a05c + 4fbf9c3 commit c9d3209
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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

0 comments on commit c9d3209

Please sign in to comment.