Houdini 19 - HDA Scripted Menus

Hi all

Has anyone tried submitting a scene containing a hda with menu parameters that call a python script from the hdaModule()?

Using the following in the menu script:

hou.pwd().hdaModule().update_menu()

Results in:

FailRenderException: AttributeError: ‘module’ object has no attribute ‘update_menu’

Bit unsure as to why this works locally but not on worker machines. If I run the script directly in the menu though, all is fine. Any thoughts?

Thanks!

Edit - Just to add more detail from the log:

STDOUT: Error running Python menu script in parameter,
STDOUT: Menu (/obj/test/menu):
STDOUT: Traceback (most recent call last):
STDOUT: File “stdin”, line 1, in module
STDOUT: File “/opt/hfs19.0.561/houdini/python3.7libs/hou.py”, line 49447, in getattr
STDOUT: return hou.HDAModule___getattr_(self, name)

Not sure, but I think pwd() might not refer to the right node.
For instance, in button callbacks you do kwargs["node"].hdaModule().update_menu(), where kwargs["node"] contains the node whose button triggered the callback.
Do not completely know how Houdini maintains the “current” node, but I remember reading something about it on the forums.