WITH#/. Clean running process with exit code -2146234327

I have a C # 4 application that launches another to execute some Python code. Python code can be executed without problems (tested on PythonWin).
In my application, I see that the exit code is -2146234327. I was googling and couldn't understand what that meant.
Any ideas?
Thanks

+4
source share
2 answers

-2146234327 is the HRESULT code, which is usually seen in hexadecimal. See HRESULTS Interpretation Returned from .NET / CLR: 0x8013XXXX :

HOST_E_EXITPROCESS_TIMEOUT 0x80131029 Process terminated due to escalation of timeout.

+6
source

I wrote a workaround based on the fact that this is a warning, not an error.

I included the following in a DOS batch file that starts rebuilding and indexing processes for ArcGIS

 set myRC=%ERRORLEVEL% echo %myRC% set Constant=-2146234327 echo %Constant% if %myRC% EQU %Constant% set ERRORLEVEL=0 echo %ERRORLEVEL% 
  • Line 1 sets the variable to the value returned from the call command, for example. call D: \ Python27 \ ArcGIS10.2 \ python.exe D: \ Analyze \ Analyze.py -> D: \ Analyze \ Log \ output.txt
  • Line 2 repeats the return value
  • Line 3 sets the constant variable
  • Line 4 echoes
  • Line 5 compares the value returned by the CALL command with a constant and sets the ERRORLEVEL variable to zero if they match
  • Line 6 displays the return code.

I found this information elsewhere, which can tell a little about the problem:

https://github.com/ucd-cws/arcpy_metadata/issues/13

+1
source

Source: https://habr.com/ru/post/1437798/