Houdini Workfile Publishing Error

Houdini: 19.0.531
Houdini Addon: 0.2.11
Openpype Addon: 3.18.7

Heya, I suspect this is a python 3 compatibility issue but I get the following error when publishing a Houdini workfile and haven’t been able to solve it.

Publish Error
Traceback (most recent call last):
  File "C:\Users\stephen.scollay\AppData\Local\Ynput\AYON\dependency_packages\ayon_2401161802_windows.zip\dependencies\pyblish\plugin.py", line 527, in __explicit_process
    runner(*args)
  File "C:\Users\stephen.scollay\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\houdini\plugins\publish\validate_workfile_paths.py", line 28, in process
    invalid = self.get_invalid()
  File "C:\Users\stephen.scollay\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\houdini\plugins\publish\validate_workfile_paths.py", line 73, in get_invalid
    v for v in cls.prohibited_vars
  File "C:\Users\stephen.scollay\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\houdini\plugins\publish\validate_workfile_paths.py", line 74, in <genexpr>
    if v in param.unexpandedString()):
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.531/houdini/python3.7libs\hou.py", line 64385, in unexpandedString
    return _hou.Parm_unexpandedString(self)
hou.OperationFailed: The attempted operation failed.
Cannot get unexpanded string for parms with keyframes

I was also hoping that someone could cast a light on how these validators work as the Validate Workfile Paths validator gets caught up in the for each loops inside the rbdFracture node on a fracture type im not even using. I just had to swap it out for a different node as that wasn’t what I was testing.

Cheers,
Stephen

I would suspect it to have something to do with the workfile template path in anatomy. Could you maybe post that?

@mustafa_jafar might know more.

Speediest reply! Thank you! Don’t believe I have touched the Workfile templates but this is what they look like:

The path for the workfile is here:
Y:\TestAyon\BJ0003_Ayon_SGCreated_Test\SGC\0010\work\FX

With the published workfile seemingly going here:
Y:\TestAyon\BJ0003_Ayon_SGCreated_Test\SGC\0010\publish\workfile\workfileFX\v001

I was able to replicate this situation in the following scenario.

  1. Create point cache alembic
  2. Applying Keyframes on output file path
  3. Disable the point cache instance
  4. Publish workfile.


How "Validate Workfile Paths" works:

"Validate Workfile Paths" is used to ensure you are using absolute file paths on some node types. find the list in ayon+settings://houdini/publish/ValidateWorkfilePaths/node_types
e.g. on alembic rop. I can’t use $HIP and publish a workfile.

Actually, that’s not the error replicated. The reported issue by this topic comes from:

File "C:\Users\stephen.scollay\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\houdini\plugins\publish\validate_workfile_paths.py", line 74, in <genexpr>
    if v in param.unexpandedString()):

Which doesn’t generate a PublishValidationError but a hou.OperationFailed and thus does not generate a nice report.

This would be a bug in the code. It’s also not a Py3-compatibility error.

Apparently, you can’t call unexpandedString if there are keyframes on a parm. As such, we should workaround that in a way. Best to test with a parm with keyframes and see what gives you the best unexpanded result to compare against. Or, we disallow keyframes altogether. But maybe there’s a reason to allow keyframes on such parms? If so, then we should fix the validator logic to allow it.

We have this validator disabled on our end so haven’t hit the issue.

Workfile Paths validator gets caught up in the for each loops inside the rbdFracture node on a fracture type im not even using.

Caught up, how? Hangs indefinitely? Is just very slow? Or what happens?

Thanks so much for investigating this guys. For the record, the output paths in the scene are not keyed (Unless using variables such as $F for frame caches counts but those are there by default anyhow). I am using the default validators and the default nodes created by Ayon, so there isn’t any funky custom stuff I am trying to do.

@BigRoy The validator was getting caught indefinitely (over 10mins before I cancelled it) in the rbd wood fracture validating paths even though I was using a concrete fracture. I have since switched to Houdini 20 to minimise compatibility issues and now neither of these errors crop up. Whether that was the difference maker I am not sure.