Not shutting down after error occured

Hi,
I tested also your script and for me it worked. Can you provide the application reset (Reset RealityCapture) and then try to use the script again?
Which version of RealityCapture are you using?