Tk-multi-publish2 apps not working with python3.7 and above

Hi,

So I do a lot of publishing via the API - bootstrapping the toolkit and accessing the publish plugins from tk-multi-publish2.

This works fine for python2.7.

I’ve recently started testing it with python 3 and when I iterate through all the available apps for the engine I’ve started, tk-multi-publish2 does not show up. I tried this from 3.6-3.9.
Only 3.6 works.

Any idea why the same code base works for python2.7 and 3.6 but not for 3.7 and above? The fact that I’m pinned to python3.6 is a bit frustrating.

This is a pared-down snippet of what I run:

    toolkit_manager = sgtk.bootstrap.ToolkitManager(sg_user=auth_user)

    base_cfg = "sgtk:descriptor:app_store?name=tk-basic-config"
    
    toolkit_manager.base_configuration = base_cfg
    toolkit_manager.pipeline_configuration = 249

    plugin_id = "basic.my_toolkit_plugin"
    toolkit_manager.plugin_id = plugin_id
    engine = toolkit_manager.bootstrap_engine(
        engine_name,
        entity={"type": "Project", "id": project["id"]}
    )

    for app in engine.apps:
        LOGGER.debug(app)

and for 2.7, 3.6 the log displays (this is the base tk-shotgun app on a fresh test project config):

tk-multi-launchapp
tk-multi-launchhiero
tk-multi-launchmari
tk-multi-launchmotionbuilder
tk-multi-publish2
tk-multi-screeningroom
tk-shotgun-launchfolder

and the same code run on 3.7-above:

tk-multi-launchapp
tk-multi-launchhiero
tk-multi-launchmari
tk-multi-launchmotionbuilder
tk-multi-screeningroom
tk-shotgun-launchfolder

No tk-multi-publish2.

Thoughts or solutions would be greatly appreciated!

Thanks!

There might be an error in the log files from bootstrap. I guess tk-core.log would be the one. And also on stdout if you are running this from a terminal.
Toolkit can produce quite a bit of output, so search the log for “error” or smth.

I must have overlooked this during the output:

App C:\Users<user>\AppData\Roaming\Shotgun\bundle_cache\app_store\tk-multi-publish2\v2.6.0 failed to initialize. It will not be loaded: The SG Toolkit App you are trying to execute requires a full QT environment in order to render its UI. A valid PySide2/PySide/PyQt installation could not be found in your python system path.

I encountered this a long time ago and I think I bypassed it by doing something like
engine._has_ui = True to force it to think it was a QT environment. That doesn’t seem to be working when I used python3.7, etc.

Would be good to make a support ticket and log this with the dev team.

Hi @StarkRavenSimone !

I think all you have to do is install PySide2 for your python 3 Interpreter. Unfortunately the publisher has a dependency to it. Even if used headless.

Cheers,