From b567af166ddf2e72c9a8a38653595b292641f67a Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 14 Nov 2019 11:21:55 +0100 Subject: [PATCH] bugfix/environment_crashing_on_floats --- pype/plugins/maya/publish/submit_maya_deadline.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pype/plugins/maya/publish/submit_maya_deadline.py b/pype/plugins/maya/publish/submit_maya_deadline.py index 5bb50bd85e..55c04e9c41 100644 --- a/pype/plugins/maya/publish/submit_maya_deadline.py +++ b/pype/plugins/maya/publish/submit_maya_deadline.py @@ -271,20 +271,21 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin): for key in environment: clean_path = "" self.log.debug("key: {}".format(key)) - to_process = environment[key] + self.log.debug("value: {}".format(environment[key])) + to_process = str(environment[key]) if key == "PYPE_STUDIO_CORE_MOUNT": - clean_path = environment[key] - elif "://" in environment[key]: - clean_path = environment[key] - elif os.pathsep not in to_process: + clean_path = to_process + elif "://" in to_process: + clean_path = to_process + elif os.pathsep not in str(to_process): try: - path = environment[key] + path = to_process path.decode('UTF-8', 'strict') clean_path = os.path.normpath(path) except UnicodeDecodeError: print('path contains non UTF characters') else: - for path in environment[key].split(os.pathsep): + for path in to_process.split(os.pathsep): try: path.decode('UTF-8', 'strict') clean_path += os.path.normpath(path) + os.pathsep