What would prevent tk-maya's userSetup.py from being called when Maya is launched through SGDesktop?

Hi all,

Situation here where some users aren’t getting the Shotgun menu in Maya, while most are, all while running the same SG config. I’ve checked tk-maya log files for those users (and also tk-desktop log files) but found nothing of note.

Beyond those log files, anywhere else I should be looking? Considering it’s working for the majority, I’m stumped.

Cheers,

Further investigation reveals that for at least one of the affected users (the one we tested with), start_toolkit isn’t being run at all, even though if you e.g. import sgtk in the Maya session where start_toolkit didn’t run, it imports fine and is the correct toolkit (so it’s not a general tookit failure).

Let’s amend the original question to “what would stop start_toolkit from even being called when Maya is launched through SGDesktop?”

I’m guessing this is where it should be called from:

After Maya has launched, inspecting the PYTHONPATH environment variable’s value shows that it includes the correct path to userSetup.py (with the start_toolkit() method) in both successful and failing situations, e.g.:

X:/sgtk_studio/_projects/REDACTED/shotgun_configuration/install/app_store/tk-maya/v0.10.1/startup

If I run start_toolkit() in a session for a user where everything is fine, it expectedly complains about missing sgtk setup specific env vars e.g. SGTK_ENGINE etc. No worries.

If we run start_toolkit() in a session for a user who is experiencing problems, we get:

# Error: NameError: file <maya console> line 1: name 'start_toolkit' is not defined #

…just pointing to the fact that the userSetup.py that was supposed to run never got called during startup by SGDesktop for the users experiencing problems.

Any clues as to where else to look would be appreciated at this point.

What version of Maya?

Have you tried checking the Maya Output Console to see if there are any exceptions being raised by the toolkits userSetup.py?

Hi @Dan_Bradham,

The version of Maya is 2020.4 (on Windows10).

Will check the Output Window info, I’d made a bad assumption that its contents would be included in the tk-maya.log files.