Hello group,
We are using Shotgun and it’s pipeline for a couple of years now.
We’re in the process of updating the Pipeline to Python 3. Which hasn’t been smooth to say the least…
So we’ve installed the newest version of SG Desktop and set the env var SHOTGUN_PYTHON_VERSION = 3.
Desktop starts normally, but now on some machines we get the following error when we want to launch Nuke or Houdini. Now on most machines we can launch, but for some unknown reason we can’t on others.
2022-03-09 11:07:33,418 [ INFO] Connecting to gui pipe \\.\pipe\pyc-25540-0-zbhe2q8r
2022-03-09 11:07:40,192 [ ERROR] [PROXY] Error calling __commands::nuke_12.1v2((), {}):
Traceback (most recent call last):
File "C:\Users\HIDDEN\AppData\Roaming\Shotgun\bundle_cache\app_store\tk-desktop\v2.6.1\python\tk_desktop\desktop_engine_project_implementation.py", line 210, in _trigger_callback
callback(*args, **kwargs)
File "C:\Users\HIDDEN\AppData\Roaming\Shotgun\HIDDEN\p1607c1616.basic.desktop\cfg\install\core\python\tank\platform\engine.py", line 1083, in callback_wrapper
return callback(*args, **kwargs)
File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.1\python\tk_multi_launchapp\base_launcher.py", line 138, in launch_version
**kwargs
File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.1\python\tk_multi_launchapp\base_launcher.py", line 405, in _launch_callback
software_entity,
File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.1\python\tk_multi_launchapp\base_launcher.py", line 190, in _launch_app
app_engine, app_path, app_args, context, file_to_open
File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-multi-launchapp\v0.12.1\python\tk_multi_launchapp\prepare_apps.py", line 51, in prepare_launch_for_engine
launch_info = launcher.prepare_launch(app_path, app_args, file_to_open)
File "C:\Program Files\Shotgun\Resources\Desktop\Python\bundle_cache\app_store\tk-nuke\v0.14.3\startup.py", line 267, in prepare_launch
required_env["TANK_CONTEXT"] = sgtk.Context.serialize(self.context)
File "C:\Users\HIDDEN\AppData\Roaming\Shotgun\HIDDEN\p1607c1616.basic.desktop\cfg\install\core\python\tank\context.py", line 762, in serialize
return pickle.dumps(data)
File "C:\Users\HIDDEN\AppData\Roaming\Shotgun\HIDDEN\p1607c1616.basic.desktop\cfg\install\core\python\tank\util\pickle.py", line 46, in dumps
return six.ensure_str(cPickle.dumps(data, **DUMP_KWARGS))
File "C:\Users\HIDDEN\AppData\Roaming\Shotgun\HIDDEN\p1607c1616.basic.desktop\cfg\install\core\python\tank_vendor\six.py", line 899, in ensure_str
s = s.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 150: invalid continuation byte
It looks like for some reason in Python 3 mode it cannot properly decode a string. But why it does work on other machines is a mystery. So for now we have to revert back to python 2 on some machines. But this is not a nice sollution since some apps don’t work properly.
Now, I don’t want to fiddle with the App code itself, otherwise I have to change the code everytime we update the App in the future.
If anybody has a solution or other insights it would really make my day…
Cheers,
David