George Rolfe

George Rolfe

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Trying to use command line but getting a .dll error. March 26, 2019, 1:41 a.m.

I'm trying to do this as well in Houdini 17.5/Windows 10 and i'm getting the same error.

Here's a workaround which will find hython and re-run the script there:
import os, sys

def _locate_houdini():
import os
from _winreg import ConnectRegistry, OpenKey, CloseKey, EnumKey, EnumValue, QueryValue, HKEY_LOCAL_MACHINE

install_path = None
abort = False
while install_path is None and not abort:
try:
registry = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
key_path = 'SOFTWARE\\Side Effects Software\\'
key = OpenKey(registry, key_path)
i = 0
while install_path is None:
sub_key = EnumKey(key, i)
i += 1
if sub_key == 'Houdini' or sub_key == 'Houdini Engine':
sub_key = OpenKey(key, sub_key)
install_path = EnumValue(sub_key, 0)[1]
if not os.path.exists(install_path):
install_path = None
CloseKey(sub_key)
CloseKey(key)
except:
pass

return install_path

def _locate_hython():
houdini_path = _locate_houdini()
hython_path = houdini_path + 'bin\\hython2.7.exe'
assert os.path.exists(hython_path), 'hython not found!'
return hython_path

def _bootstrap(argv):
import subprocess
hython_path = _locate_hython()
subprocess.call([hython_path, __file__] + argv)

# We're running in hython
def execute(argv):
import hou
print 'hello in hython'
print argv

def main(argv):
try:
import hou
execute(argv)
except:
_bootstrap(argv)

if __name__ == '__main__':
main(sys.argv[1:])

Qt5, Qt Warn March 13, 2019, 11:35 p.m.

I'm getting this in 17.5 as well.