Hey @tokejepsen,
Seeing as this works well anywhere but on your machine, as far as I know, I’ve got an idea for how to get to the bottom of it.
The primary thing separating your machine from any other in any given circumstance boils down to environment variables. So what I’ll suggest is a “deep clean” of environment variables in an isolated terminal from which we run and iteratively re-add current variables as we go.
It should take less than 20 mins, and should clear out which of them is responsible.
1. Deep Clean
This will remove all environment variables, but only within the current terminal, so don’t worry about anything happening to your global environment. That’s protected via the fact that the terminal itself isn’t an admin process (don’t run it as an admin if you want to be sure).
clear_env.bat
@echo off
if exist ".\restore_env.bat" del ".\restore_env.bat"
for /f "tokens=1* delims==" %%a in ('set') do (
echo set %%a=%%b>> .\restore_env.bat
set %%a=
)
Once run, your environment will be empty, apart from read-only variables.
before
$ set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\marcus\AppData\Roaming
asl.log=Destination=file
CLINK_DIR=C:\Program Files (x86)\clink\0.4.4
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
...
After
$ clear_env
$ set
prompt=$p$g
It will create an additional file, restore_env.bat
which you can run to restore the environment to what it was, and more importantly, to see and inspect what you have.
2. Run
From here, you could try and run a host, but you’ll find you can’t because there are certain system variables it expects to find.
From your restore_env.bat
, cut out the lines with these variables in them and paste them into the terminal.
HOMEDRIVE
HOMEPATH
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramData
ProgramFiles
ProgramFiles
ProgramW6432
SystemDrive
SystemRoot
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
Next we’ll need Pyblish.
$ set PYTHONPATH=c:\pyblish_win\pythonpath
$ set PYTHONPATH=c:\pyblish_win\lib\pyblish-x\integrations\maya;%PYTHONPATH%
Now launch two hosts.
$ start "" "c:\Program Files\Autodesk\Maya2015\bin\maya.exe"
$ start "" "c:\Program Files\Autodesk\Maya2015\bin\maya.exe"
At this point, your computer and my computer should be roughly identical.
Try running Pyblish from both hosts.
3. Find the problem
If the above worked, then we’ve isolated the problem to one or more of the environment variables captured in restore_env.bat
.
From here, keep cutting out variables and paste them into the same terminal as before, launch a host and test as you go. When you start experiencing the problem once more, you’ll know which variable caused it.