Hello,
I have recently noticed a quite strange behavior when calling the CLI from python or from a batch file:
When I run a very simple command in the command prompt, for example “RealityCapture.exe -newScene -quit”, the exit code
is 0 (as expected, since there are no errors). When I call that command from a .bat file though I get
an exit code of … 4:
content of the example batch file:
RealityCapture.exe -newScene -quit
echo %errorlevel%
results of running the batch file:
C:\Program Files\Capturing Reality\RealityCapture>runrc.bat
C:\Program Files\Capturing Reality\RealityCapture>RealityCapture.exe -newScene -quit
C:\Program Files\Capturing Reality\RealityCapture>echo 4
4
Same behavior is observed if I call RC from a python subprocess:
>>> import subprocess
>>> subprocess.check_call("RealityCapture.exe -newScene -quit")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "A:\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'RealityCapture.exe -newScene -quit' returned non-zero exit status 4.
Am I doing something wrong ? This is a bit problematic since I would like to be able to check for my reality capture calls…
Thanks in advance !