Running from separate repos

So updating to 1.3 I decided to make a switch to running from individual repos for bigger potential flexibility and hopefully it’ll push to some more contributions too. I’m running into an issue.

I have a sneaky feeling, there are some clashes between Nuke’s PySide and PyQt5 needed by pyblish I think. The thing is that we have a confirmed bug by The Foundry that happens on some of our machines once in a while, where it’s install location needs to be explicitly added to path for PySide to be picked up in nuke (this affect for example ftrack plugins which don’t start without it). When running pyblish-win this is not affecting it at all. When running from separate repos, pyblish doesn’t start the GUI and give me attached traceback.

Question is how is PyQt set up in pyblish-win that it doesn’t clash, but it does when I simply PyQt5 to my pythonpath.

Here is the traceback for this issue.

Tried launching GUI, but failed.
Message was: Traceback (most recent call last):
  File "K:\.core\dev\pyblish\pyblish-nuke\pyblish_nuke\", line 101, in filemenu_publish
  File "K:\.core\dev\pyblish\pyblish-nuke\pyblish_nuke\", line 20, in show
  File "K:\.core\dev\pyblish\pyblish-integration\pyblish_integration\", line 71, in show, settings)
  File "C:\Program Files\Nuke9.0v8\lib\", line 1224, in __call__
    return self.__send(self.__name, args)
  File "C:\Program Files\Nuke9.0v8\lib\", line 1578, in __request
  File "C:\Program Files\Nuke9.0v8\lib\", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Program Files\Nuke9.0v8\lib\", line 1292, in single_request
    self.send_content(h, request_body)
  File "C:\Program Files\Nuke9.0v8\lib\", line 1439, in send_content
  File "C:\Program Files\Nuke9.0v8\lib\", line 954, in endheaders
  File "C:\Program Files\Nuke9.0v8\lib\", line 814, in _send_output
  File "C:\Program Files\Nuke9.0v8\lib\", line 776, in send
  File "C:\Program Files\Nuke9.0v8\lib\", line 757, in connect
    self.timeout, self.source_address)
  File "C:\Program Files\Nuke9.0v8\lib\", line 571, in create_connection
    raise err
error: [Errno 10061] No connection could be made because the target machine actively refused it

Publishing in headless mode instead.

this is my environment in nuke after running it via our wrappers that set everything up.

{'ALLUSERSPROFILE': 'C:\\ProgramData',
 'APPDATA': 'C:\\Users\\milan.kolar\\AppData\\Roaming',
 'ASSET_BUILD': 'char1',
 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files',
 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files',
 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files',
 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
 'DEADLINE_PATH': 'C:\\Program Files\\Thinkbox\\Deadline7\\bin',
 'FE': '1',
 'FOLDER': 'Characters',
 'FOUNDRY_ASSET_PLUGIN_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\ftrack_connect_nuke',
 'FOUNDRY_LICENSE': 'C:\\Users\\milan.kolar\\FoundryLicensing\\00ffd4c7f8e3;C:\\Program Files\\The Foundry\\RLM;C:\\ProgramData\\The Foundry\\RLM;C:\\Program Files (x86)\\The Foundry\\RLM;C:\\Users\\milan.kolar\\FoundryLicensing',
 'FS': '1',
 'FTRACK_CONNECT_EVENT': 'eyJhY3Rpb25JZGVudGlmaWVyIjogImZ0cmFjay1jb25uZWN0LWxhdW5jaC1udWtlIiwgInNvdXJjZSI6IHsiaWQiOiAiOWU3YmQ2YTQ4Zjg4NDE0Nzk2MjU3MTcxZmUzZjU0OTciLCAidXNlciI6IHsidXNlcm5hbWUiOiAibWlsYW4ua29sYXIiLCAiaWQiOiAiYmNkZjU3YjAtYWNjNi0xMWUxLWE1NTQtZjIzYzkxZGYxMjExIn19LCAic2VsZWN0aW9uIjogW3siZW50aXR5SWQiOiAiMGY0OTU1ZTAtOGM3Ni0xMWU1LTk3MzUtMDQwMTIxYjllNzAxIiwgImVudGl0eVR5cGUiOiAidGFzayJ9XSwgImRlc2NyaXB0aW9uIjogbnVsbCwgImFwcGxpY2F0aW9uSWRlbnRpZmllciI6ICJudWtlXzkuMHY4IiwgImljb24iOiAibnVrZSIsICJ2YXJpYW50IjogIjkuMHY4IiwgImxhYmVsIjogIk51a2UifQ==',
 'FTRACK_CONNECT_NUKE_STUDIO_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\ftrack_connect_nuke_studio',
 'FTRACK_CONNECT_PACKAGE': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package',
 'FTRACK_CONNECT_PACKAGE_RESOURCE_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource',
 'FTRACK_EVENT_PLUGIN_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\ftrack_connect_nuke\\crew_hook',
 'FTRACK_PYTHON_API_PLUGIN_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\ftrack_connect_nuke\\..\\ftrack_python_api',
 'FTRACK_RESOURCE_SCRIPT_PATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\script',
 'HOME': 'C:\\Users\\milan.kolar',
 'HOMEPATH': '\\Users\\milan.kolar',
 'HSITE': 'K:\\.core\\repos\\houdini\\HSITE',
 'LIBRARY': 'Assets',
 'LOCALAPPDATA': 'C:\\Users\\milan.kolar\\AppData\\Local',
 'LOGNAME': 'milan.kolar',
 'LOGONSERVER': '\\\\001-BEER',
 'MOZ_PLUGIN_PATH': 'C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\plugins\\',
 'NUKE_I_2015_1026': '1468276da1f6ca7f3ad7bbc8af9f6644756608870941855478d99dc728f15e5286dc00760c8158b014ef624a5c102a158de0d56c437f4616ba9b5095419405b6f1d8cdb5fa97b733cd375107c1a82b030f488d25e64a6d1baec4011bc27fd23e43fac505629c9038b829b56bee9d39a3572d928e522b30fc9a05acac59118634',
 'NUKE_PATH': 'K:\\.core\\dev\\nuke;K:\\.core\\dev\\nuke\\gizmos;K:\\.core\\dev\\Tapp;K:\\.core\\dev\\Tapp\\System;K:\\.core\\dev\\pyblish\\pyblish-nuke\\pyblish_nuke\\nuke_path;K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\ftrack_connect_nuke\\nuke_path',
 'NUKE_TEMP_DIR': 'C:/nuketemp',
 'OS': 'Windows_NT',
 'PATH': 'C:\\Python27\\;C:\\Python27\\Scripts;C:\\Users\\milan.kolar\\AppData\\Local\\Pandoc;C:\\Program Files\\djv-1.1.0-Windows-64\\bin;C:/Program Files/Side Effects Software/Houdini 14.0.346/bin/;C:\\Python27\\Scripts;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Git\\cmd;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Python27;C:\\Program Files\\OpenVPN\\bin;C:\\Program Files (x86)\\mrViewer-v3.0.6-Windows-32\\bin;C:\\Program Files (x86)\\Skype\\Phone\\;C:\\Users\\milan.kolar\\AppData\\Local\\atom\\bin;C:\\Users\\milan.kolar\\AppData\\Local\\Pandoc\\;K:\\.core\\dev\\studio\\launchers\\..\\..\\python\\Python27;K:\\.core\\software\\ffmpeg\\bin;K:\\.core\\software\\djv\\bin;C:\\Program Files\\Thinkbox\\Deadline7\\bin;C:\\Program Files\\Nuke9.0v6;C:\\Program Files\\Nuke9.0v7;C:\\Program Files\\Nuke9.0v8',
 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 60 Stepping 3, GenuineIntel',
 'PROGRAMDATA': 'C:\\ProgramData',
 'PROGRAMFILES': 'C:\\Program Files',
 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)',
 'PROGRAMW6432': 'C:\\Program Files',
 'PROJECT': 'D001_pipe_dev',
 'PROJECT_ROOT': 'K:\\Projects\\D001_Pipe_Dev',
 'PROMPT': '$P$G',
 'PSMODULEPATH': 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\',
 'PUBLIC': 'C:\\Users\\Public',
 'PYBLISHPLUGINPATH': 'K:\\.core\\dev;K:\\.core\\dev\\pyblish\\pyblish-kredenc\\pyblish_kredenc\\plugins;K:\\.core\\dev\\pyblish\\pyblish-ftrack\\pyblish_ftrack\\plugins;K:\\.core\\dev\\pyblish\\pyblish-deadline\\pyblish_deadline\\plugins;K:\\.core\\dev\\pyblish\\pyblish-kredenc\\pyblish_kredenc\\plugins\\houdini;K:\\.core\\dev\\pyblish\\pyblish-kredenc\\pyblish_kredenc\\plugins\\maya;K:\\.core\\dev\\pyblish\\pyblish-kredenc\\pyblish_kredenc\\plugins\\nuke',
 'PYTHONPATH': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\;K:\\.core\\dev;K:\\.core\\dev\\python\\packages;K:\\.core\\dev\\ftrack\\ftrack-api;K:\\.core\\dev\\ftrack\\ftrack-studio;K:\\.core\\dev\\pyblish\\pyblish;K:\\.core\\dev\\pyblish\\pyblish-integration;K:\\.core\\dev\\pyblish\\pyblish-tray;K:\\.core\\dev\\pyblish\\pyblish-standalone;K:\\.core\\dev\\pyblish\\pyblish-maya;K:\\.core\\dev\\pyblish\\pyblish-nuke;K:\\.core\\dev\\pyblish\\pyblish-hiero;K:\\.core\\dev\\pyblish\\pyblish-rpc;K:\\.core\\dev\\pyblish\\pyblish-qml;K:\\.core\\dev\\pyblish\\pyblish-deadline;K:\\.core\\dev\\pyblish\\pyblish-kredenc;K:\\.core\\dev\\python-qt5;K:\\.core\\dev\\maya;K:\\.core\\dev\\maya\\scripts;K:\\.core\\dev\\pyblish\\pyblish-maya\\pyblish_maya\\pythonpath',
 'REQUESTS_CA_BUNDLE': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\resource\\cacert.pem',
 'RV_SUPPORT_PATH': 'K:\\.core\\dev\\rv\\custom',
 'SESSIONNAME': 'Console',
 'STUDIO_REPOS': 'K:\\.core\\dev\\studio\\launchers\\..\\..\\..\\repos',
 'STUDIO_SOFT': 'K:\\.core\\dev\\studio\\launchers\\..\\..\\..\\software',
 'STUDIO_TOOLS': 'K:\\.core\\dev\\studio\\launchers\\..\\..',
 'SYSTEMROOT': 'C:\\Windows',
 'TASK': 'model',
 'TCL_LIBRARY': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\tcl',
 'TEMP': 'C:\\Users\\MILAN~1.KOL\\AppData\\Local\\Temp',
 'TK_LIBRARY': 'K:\\.core\\dev\\ftrack\\ftrack-connect\\ftrack-connect-package\\tk',
 'TMP': 'C:\\Users\\MILAN~1.KOL\\AppData\\Local\\Temp',
 'USERDOMAIN': '001-beer',
 'USERNAME': 'milan.kolar',
 'USERPROFILE': 'C:\\Users\\milan.kolar',
 'WINDIR': 'C:\\Windows',

Excellent initiative!

I think this definitely is the to-go approach for any serious integration of Pyblish, where pyblish-win is more of a stepping stone to simplify first steps. So let’s break it down.

Step 1


At it’s core, you’ll need relevant Pyblish libraries on your PYTHONPATH. This typically involves cloning relevant repos and adding each.

$ mkdir pyblish
$ cd pyblish
$ git clone
$ git clone
$ git clone

Read on for details on which repositories you’ll need/want.

Step 2


Next, as you experienced, you will need PyQt5 on your PATH and PYTHONPATH. The trick here is that your host doesn’t need either of these, so don’t bother adding them on startup. Instead, simply create a wrapper such that you can launch pyblish-qml on its own.

This could be as simple as…


set PYTHONPATH=c:\pyblish\pyblish-qml;c:\pyblish\python-qt5;c:\pyblish\pyblish-base;c:\pyblish\pyblish-rpc
set PATH=c:\pyblish\python-qt5\PyQt5;%PATH%
python -m pyblish_qml

Notice that it isn’t important to include %PYTHONPATH% - pyblish-qml only has these exact dependencies to do it’s thing.

Since a few versions ago, you may also want to consider using pyblish-tray to keep track of the invisible process that would otherwise lie around in the background.

Windows - pyblish-tray.bat

set PYTHONPATH=c:\pyblish\pyblish-qml;c:\pyblish\python-qt5;c:\pyblish\pyblish-base;c:\pyblish\pyblish-rpc;c:\pyblish\pyblish-tray
set PATH=c:\pyblish\python-qt5\PyQt5:%PATH%
python -m pyblish_tray

Linux/OSX -

#!/usr/bin/env bash
export PYTHONPATH=/pyblish/pyblish-qml:/pyblish/python-qt5:/pyblish/pyblish-base:/pyblish/pyblish-rpc:/pyblish/pyblish-tray
export PATH=/pyblish/python-qt5\PyQt5;$PATH
python -m pyblish_tray

Modify the paths to fit your circumstances, and add this wrapper to the startup of yours and everyone else’s machines, and you won’t have to worry about PyQt5 in your hosts; it’s all taken care of in this one external and isolated process.

Step 3

Optional Fallback

If you really want to launch pyblish-qml from your host, as it does per default in pyblish-win as a fallback if it hasn’t already been started separately, let me know and I’ll fill in the blanks on that, but I strongly recommend you launch it separately and I’m sure you will find it much more manageable as well.


Here’s some pointers on what you might want to consider cloning.


You can get by with just this, just add whatever else you need from below.

  • git clone


With this, you’re ready to launch pyblish-qml.

  • git clone
  • git clone

You’ll also need PyQt5.

If you’re on Windows, there’s this.

  • git clone --depth 1

For any other platform, you will need to build it yourself for Python 2.6-2.7. It’s much more straightforward than on Windows (hence the supplied binaries), see here for help with that.


To integrate with any host, you’ll also need this.

  • git clone


Finally, pick the ones to integrate with.

  • git clone
  • git clone
  • git clone
  • git clone
  • git clone
  • git clone


Additionally, have a look in the pyblish organisation for other essentials.

Such as:

  • git clone
  • git clone
  • git clone
  • git clone
  • git clone


For a quick test, from the directory into which you clones these projects, try this.

Windows (cmd.exe)

> set PYTHONPATH=%cd%/pyblish-base;%cd%/pyblish-qml;%cd%/pyblish-rpc;%cd%/python-qt5
> set PATH=c:\pyblish\python-qt5\PyQt5;%PATH%
> python -m pyblish_qml --debug

Linux/OSX (bash)

$ export PYTHONPATH=$(pwd)/pyblish-base:$(pwd)/pyblish-qml:$(pwd)/pyblish-rpc:$(pwd)/python-qt5
$ export PATH=/pyblish/python-qt5/PyQt5:$PATH
$ python -m pyblish_qml --debug

This will present you with the pyblish-qml GUI, proving that all libraries were cloned correctly, that PyQt5 and your Python interpreter works well.

Any issues? Post here.


Once pyblish-qml is up and running, you’ve got a few options for running it from the host.

  1. Launch a host, and run setup() for your integration
  2. Add setup() to your startup script
  3. Add an environment variable

setup() is accessible directly via each integration, and can be run at any point during startup. (That is, no need to think about “deferred” evaluation and such. The order in which you run setup() and launch pyblish-qml also does not matter).

# Example
import pyblish_maya

Each integration also provides an option to add an environment variable from which your host automagically runs setup() for you.

For example, pyblish-maya supports adding pyblish-maya/pythonpath to your PYTHONPATH whereas pyblish-nuke supports NUKEPATH. Both of which provides the same end result.


One thing that is important to mention is that though this approach allows you to reap the benefits of the latest and greatest, as well as make modifications on your own and contribute to Pyblish, you are likely to experience problems not found in the official combination of supported packages.

That is why it is a good idea to keep the pyblish repository at your side in addition to each individual repository, such that you can at any time revert back to it in the face of trouble by simply remapping the environment variables to it.


> set PYTHONPATH=c:\pyblish_development\pyblish-base;...
> maya


# Launch stable
> export PYTHONPATH=c:\pyblish\moduoles\pyblish-base;...
> maya

Seeking help

When you seek help, use this forum to post issues about a particular version of the official combination - pyblish - using the “Support” category. For issues with individual repos outside of this combination, post them in the issues section of the corresponding repository on GitHub; don’t post here.

For example:

Use the two options to your advantage when narrowing down a problem; if a bug doesn’t exist in the stable release, then you can be sure it’s new and awaiting to be squashed.

Next Steps

Now all you need is to launch pyblish-qml via the wrapper script described above, and launch your hosts with similar wrappers; appending all libraries except pyblish-qml and python-qt5.

Here’s an example.


> set PYTHONPATH=c:\pyblish\pyblish-base;c:\pyblish\pyblish-qml;c:\pyblish\pyblish-rpc;c:\pyblish\pyblish-maya;c:\pyblish\pyblish-maya\pyblish_maya\pythonpath;%PYTHONPATH%
> maya.exe

> export PYTHONPATH=/pyblish/pyblish-base:/pyblish/pyblish-qml:/pyblish/pyblish-rpc:/pyblish/pyblish-maya:/pyblish/pyblish-maya/pyblish_maya/pythonpath:$PYTHONPATH
> maya

Then you’re ready for action. You can now get the latest bleeding edge versions of each repo, along with producing your own commits, making pull-requests and progress the framework on your own!

Have fun!

1 Like

Actually I think that’d be interesting. I think at that point all the information is here to run "like pyblish-win" but using separate repositories.

Turns out I was 99% there and all I needed was properly configured qt.conf file in the python-qt5 directory and python27.dll (like here

Then I managed to get it to work. However I ran into a problem that I haven’t realised until now, because we weren’t really using pyblish-tray.

If I start pyblish tray an let it run in the background waiting for host to connect to it, It doesn’t inherit my tasks environment once I need to publish. Which makes sense since it’s a completely independent process, however it means that pyblish-tray is of no use for us and we have to always start from the host, which is then working flawlessly.

When we launch a task from ftrack webUI it sends an event to ftrack-connect, which in turn launches the host with proper environment based on the task and software that was chosen.

I guess the point is, that I can’t quite see the benefits of pyblish-tray yet. Or I might have simply set it up wrong :smile:

If this were true, who would it be of use for? Think about it. : -)

No, neither Tray nor the GUI needs a particular environment set up for it, other than one with access to Python and PyQt. Once either of those a up and running, you should find yourself with an identical experience to when you run it from a host. If you aren’t, then that’s a bug and we’ll want to squash that.

The recommended use for Tray is to run it during startup, and then forget about it. You will find hosts launching quicker and not having to worry about PyQt, 64-bit or otherwise compatible Python interpreters and what not; it will just work.

pyblish-tray requires pyblish-base, pyblish-rpc, pyblish-qml, pyblish-tray and PyQt5. With setup, you launch with…

$ python -m pyblish_tray

Fair enough. I’m clearly doing something wrong somewhere.

I’ll try to strip away my setup to as minimal as possible to get to the bottom of it. It’s not a problem of getting it to run anymore really, that’s fairly straightforward now. I’m just getting a different experience with tray compared to without. Thinking about it, this was the case when I installed in PFX as well, we ended up not using tray and then everything was smooth. I just didn’t have time to make an issue and then I forgot about it till now.

Going on a todo list for me