Houdini 17 and 123.py error

I am trying to submit a job from H17 to Deadline, but it is giving an error in the Client log

NameError: global name ‘hou’ is not defined

The error has something to do with 123.py which is loaded at startup in Houdini.
I am using functions from the ‘hou’ module in the script to setup standard things I use in each new houdini scene

If I rename or delete 123.py, everything works properly.

I have tried adding C:/Program Files/Side Effects Software/Houdini 17.0.352/houdini/python2.7libs to the Python search paths in the Repository options but to no avail.

Ah, those Repo Python Paths are for Deadline itself and don’t get set in the environment (Maya got angry when we did that).

If the rest of Houdini is working alright (including our own hrender_dl.py) I don’t think it’s environment as we’re just as reliant on that global ‘hou’ as this 123.py file is.

Weird question as it’s outlined here, have you tried the import hou? Our script for some reason doesn’t need it, but maybe this script you’re using is run before it’s imported. Info here:
https://www.sidefx.com/forum/topic/53383/

‘import hou’ by itself threw an segment fault,

import sys
sys.path.append("C:/Program Files/Side Effects Software/Houdini 17.0.352/houdini/python2.7libs/")
import hou

works fine though.

OK so that worked once, but is causing a segmentation fault now too. There is no more information in the log other than a seg fault error.

That’s not expected, that’s for sure. Are you able to load this 123.py from within the Houdini UI on the render machines? This doesn’t sound like a Deadline issue (because other things are importing ‘hou’ just fine) and it’ll likely help to cast a wider net with the Houdini scripting community.

Houdini’s a bit tricky to isolate from Deadline I believe, but the concepts are outlined in the Troubleshooting guide.

The script runs fine on render machines. In the beginning it didn’t have “import hou” at all as Houdini doesn’t need it, but Deadline was complaining that hou wasn’t defined. I thought it was originally a pathing issue but the 3 lines I added should have fixed that (Houdini doesn’t complain about those lines) but Deadline reports a seg fault. that’s the only error that is logged so I really don’t have any idea why it is doing that as it’s very vague.

Given my many years of debugging things inside vs outside Deadline I think you should dump “os.enviorn” inside your script and from the render machine you ran the test outside of Deadline then compare results. I’m randomly expecting something in “PYTHONPATH” or “PYTHONHOME” to be messing things up.

Now, why it’s segfaulting I’m not sure. Random guess is that if something is using a compiled pyd file and dynamically loading something, it might not be gracefully dealing with a library load failure. Since you called it a “segmentation fault” I’m going to assume you’re running this thing on Linux. If that’s the case, try and find how your distro deals with application crashes.

If it provides core dump files, we should be able to see the stack trace to see who’s bringing it all down:

It’s running Win10 1803. I have just done a fresh reinstall with a clean Python install. I’ll do some test when I get time and see what happens then.

Actually, if it’s on Windows at least it’ll say what library it’s dying inside of. You’ll have to find the crash report in Windows’ Event Viewer:

https://www.cyberlink.com/support/faq-content.do?id=10449

What I’m most interested in is the “Faulting Module Path”. If it’s a plugin or Houdini itself.

I’m out tomorrow, but would you be willing to have a call next week? It doesn’t quite feel like a Deadline issue, but it seems like a fun one to try and figure out. Feel free to PM me details or e-mail support@thinkboxsoftware.com to set something up.

I haven’t been able to reproduce the error again after installing Windows and everything else. It may have had something to do with a bad Python install, but I never had the need to change anything path related previously. On one hand it’s great the problem is solved now, but on the other hand I can’t really help debugging now :frowning:

Ah, that happens far too often. I’d rather you be unblocked though to be honest. :slight_smile: