AWS Thinkbox Discussion Forums

Bootstraping Houdini problems

Hi guys;

I’m tryng to bootstrap houdini on a Deadline job to be able to load sgtk nodes (instead of swaping them with regular nodes before submitting).

I’m getting this error:

2024-05-09 16:03:08: 0: INFO: ShotGrid: sgtk loaded
2024-05-09 16:03:08: 0: INFO: ShotGrid: sgtk bootstrapped
2024-05-09 16:03:15: 0: PYTHON: [ERROR sgtk.core.util.loader] Cannot load plugin file ‘Z:\Sauvage_Shotgun\DEM_ShotGrid\DEV\install\github\SAU\tk-houdini\v1.8.7\engine.py’
2024-05-09 16:03:15: 0: PYTHON: Traceback (most recent call last):
2024-05-09 16:03:15: 0: PYTHON: File “Z:\Sauvage_Shotgun\DEM_ShotGrid\DEV\install\core\python\tank\util\loader.py”, line 59, in load_plugin
2024-05-09 16:03:15: 0: PYTHON: module = imp.load_source(module_uid, plugin_file)
2024-05-09 16:03:15: 0: PYTHON: File “C:\Program Files\Thinkbox\Deadline10\bin\python3\lib\imp.py”, line 171, in load_source
2024-05-09 16:03:15: 0: PYTHON: module = _load(spec)
2024-05-09 16:03:15: 0: PYTHON: File “”, line 696, in _load
2024-05-09 16:03:15: 0: PYTHON: File “”, line 677, in _load_unlocked
2024-05-09 16:03:15: 0: PYTHON: File “”, line 728, in exec_module
2024-05-09 16:03:15: 0: PYTHON: File “”, line 219, in _call_with_frames_removed
2024-05-09 16:03:15: 0: PYTHON: File “Z:\Sauvage_Shotgun\DEM_ShotGrid\DEV\install\github\SAU\tk-houdini\v1.8.7\engine.py”, line 23, in
2024-05-09 16:03:15: 0: PYTHON: import hou
2024-05-09 16:03:15: 0: PYTHON: ModuleNotFoundError: No module named ‘hou’

These are the relevant lines of my script:

mgr = sgtk.bootstrap.ToolkitManager(sg_user=user)

mgr.base_configuration = os.environ["SHOTGUN_CONFIG_URI"]

mgr.do_shotgun_config_lookup = True

mgr.plugin_id = "basic.houdini*"

sg_entity = mgr.get_entity_from_environment()

engine = mgr.bootstrap_engine("tk-houdini", entity=sg_entity)

If I use engine = mgr.bootstrap_engine(“tk-shell”, entity=sg_entity) all seems to work without errors.
I’ve tried to add the houdini phyton39libs on PYTHONPATH and sys.path without success.

Also, not sure if loading tk-houdini will be enough to be able to render the sgtk nodes without swapping them, or if I need to swap them anyway.

So… a lot of questions here. Thanks for any help!

The engine is trying to import hou, but that is not available. Seems like the engine must be initialized iniside houdini. So move your sgtk code to hrender_dl.py, assuming you are using the default plugin.

Thanks @mois.moshev ; I figured out hou library is not available but didn’t know exactly where to put it. I’m still learning… Thansk for the tip!

For a bit more background: the Houdini.py plugin is run by Deadline. It starts hython in a subprocess, passing it the hrender_dl.py script to execute. In the Houdini Job reports, look for the line “Full Command”, and you’ll see what I mean.

1 Like
Privacy | Site terms | Cookie preferences