AWS Thinkbox Discussion Forums

dealing with failed Python jobs

Let’s say you have some Python code like this:

try: status = doSomething(x) except Exception as e: print str(e)

You want to run this code on your render farm. However, if the code fails and raises an exception and prints out the error, the job will be seen as “successful” in the monitor. What can I do in this circumstance? If I add ‘sys.exit(1)’, will the job get a ‘Failed’ status?

try: status = doSomething(x) except Exception as e: print str(e) raise

docs.python.org/2/tutorial/erro … exceptions

Ah, I think I follow.

Yes, push an exit code other than 0 and it should log as an error.

Just for fun, if you want to ignore Python fatal errors (the opposite of what I believe your asking), you can set this flag in Deadline:

self.FatalPythonErrors=False

docs.thinkboxsoftware.com/produc … 8448f6c3eb

Privacy | Site terms | Cookie preferences