File Pattern Fails in Headless Mode – 'Interrupted by User'

   1055   2   0
User Avatar
Member
2 posts
Joined: Dec. 2024
Online
Hi there,

I'm trying to run a TOP network in a headless Houdini session, but I'm encountering an issue with the File Pattern node—it throws a "file pattern interrupted by user" message.

Interestingly, everything works fine when I run the same setup from Houdini's built-in Python shell.

I've attached a simple .hip scene as an example. It includes a File Pattern node followed by a ROP FBX Output node in TOPs.

Could anyone help me understand what I might be doing wrong when running it headlessly?

Thanks in advance for your help!


Attachments:
Screenshot 2025-05-19 105702.png (63.2 KB)
Screenshot 2025-05-19 110450.png (83.9 KB)
test_filepattern.hip (171.1 KB)

User Avatar
Staff
616 posts
Joined: May 2014
Offline
Pressing the cook button on the TOP triggers a non-blocking cook, which mean the cook runs in the background. This is typically not suitable in a headless session because nothing will wait on the cook to finish, and it'll be canceled when it reaches the end of your script and Hython exits.

If you're triggering a cook programmatically in a script you should use one of the various hou.TopNode methods to do so, and pass in the block=True argument. That way your script actually waits for the cook to complete. For example: https://www.sidefx.com/docs/houdini/hom/hou/TopNode.html#cookOutputWorkItems [www.sidefx.com]
User Avatar
Member
2 posts
Joined: Dec. 2024
Online
Fantastic! You made my day. Thank you—it works perfectly now.
  • Quick Links