AWS Thinkbox Discussion Forums

Stdout handler tips?

I’m writing a little plugin, and I can’t seem to get any stdout output to come back through the handlers. I thought I might be causing trouble because I’m using rez to launch python to run a script, but if I copy the command line Deadline says it’s running and run it in a terminal, stdout (and stderr) seem to be behaving normally. I used the MayaBatch as an example, so I don’t think I’m doing anything wrong on the plugin side, either. But I get nothing.

Anyone got a list of gotchas, hidden items, or other tips of things I should be looking for? I presume I’m just missing something small and stupid.

Thanks!

Mmm… Could be Pyhton’s buffering output. You’ll notice that in our Python plugin we pass the ‘-u’ flag:

Try throwing that in as an argument and see if that helps.

Sadly, that does not seem to help. I had high hopes for that. I’ll try playing around some more in that area though. Thanks!

In your InitializeProcess function do you have this set:

self.StdoutHandling = True

Yup.

Any chance we can see a stripped down version of your code so we can advise more easily? Could you reference our shipping CmdLine or CmdScript plugins for reference?

I had been trying to do the plugin using the “advanced” method, but figured I could work around the limitations of a simple one, switched to that, and now it seems okay. So I’m going to shelve this issue for now. Thanks for the suggestions.

ok, no worries. If it helps, if I was to bet to your issues, then my random guesses would be:

  1. StdOut handlers need to be added to the correct “class”. did you add it to the wrapper or ManagedProcess class?
  2. Depending on the exact process/managedProcess or MonitoredManagedProcess you invoked, Stdout/err handling might have not been generated as you expected.

either way, glad your all sorted now.

Privacy | Site terms | Cookie preferences