I’m trying to push the farm_wrapper farm based publishing approach to our Houdini setup but I’ve hit a brick wall getting it to work within a Hython session.
If I add the usual paths to sys.path to enable importing of sgtk and run from sgtk.platform.qt import QtCore, QtGui
I get the error “Cannot import name QtCore”.
This same code works fine inside Houdini.
When I submit the farm publish to Houdini, the SG Publisher is failing with the following code. Interestingly, the same code is working fine on Nuke and Maya which are also running in cmdline mode (eg no GUI).
[INFO farm_wrapper] Publish registered!
2020-02-24 05:45:54: 0: STDOUT: main()
2020-02-24 05:45:54: 0: STDOUT: File “//lic01/deadline/dev/deadline10-Username\custom\plugins\GlobalSGPublish.py”, line 227, in main
2020-02-24 05:45:54: 0: STDOUT: publish_items(engine, app_name, publish_tree_file)
2020-02-24 05:45:54: 0: STDOUT: File “//lic01/deadline/dev/deadline10-Username\custom\plugins\GlobalSGPublish.py”, line 188, in publish_items
2020-02-24 05:45:54: 0: STDOUT: manager.publish(generator(manager.tree))
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\manager.py”, line 348, in publish
2020-02-24 05:45:54: 0: STDOUT: self._process_tasks(task_generator, lambda task: task.publish())
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\manager.py”, line 240, in _process_tasks
2020-02-24 05:45:54: 0: STDOUT: return_value = task_cb(task)
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\manager.py”, line 348, in
2020-02-24 05:45:54: 0: STDOUT: self._process_tasks(task_generator, lambda task: task.publish())
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\task.py”, line 147, in publish
2020-02-24 05:45:54: 0: STDOUT: self.plugin.run_publish(self.settings, self.item)
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\plugins\publish_plugin_instance.py”, line 198, in run_publish
2020-02-24 05:45:54: 0: STDOUT: self._hook_instance.publish(settings, item)
2020-02-24 05:45:54: 0: STDOUT: File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.293\python27\lib\contextlib.py”, line 24, in exit
2020-02-24 05:45:54: 0: STDOUT: self.gen.next()
2020-02-24 05:45:54: 0: STDOUT: File “C:\Users\Username\AppData\Roaming\shotgun\bundle_cache\app_store\tk-multi-publish2\v2.3.3\python\tk_multi_publish2\api\plugins\publish_plugin_instance.py”, line 296, in _handle_plugin_error
2020-02-24 05:45:54: 0: STDOUT: QtCore.QCoreApplication.processEvents()
2020-02-24 05:45:54: 0: STDOUT: AttributeError: ‘NoneType’ object has no attribute ‘QCoreApplication’
Can you advice on how to get SG Publish_Manager to work in a Houdini commandline session (eg hython).
Or, is this not supported?
Thanks in advance for any suggestions.
p.