Can edit your post and format your code using syntax highlighting to rule out simple errors and to make it readable please
Hi Dan, thanks for your tips. I've updated the post already.
Tried to see something obvious but couldnt to me! If my python.exe itself crashes, I usually get an exit code at a minimum. (If run from an IDE) e.g. any standard time my process finishes , or crashes with a standard python trackback, it says:
Process finished with exit code 0 (Above my console)
However if python .exe crashes, my IDE usually has something like:
Process finished with exit code -2723923718
Which you can then sometimes google to point you in the right direction.
What you could try to do is print out the path to the rasters that crash during:
sumDT + dTTemp
Then try to load these 2 files into arcmap, and try and Raster calc them manually (Or whatever that line of code does), and see if you get a better error message or if Arc crashes.
If Arc crashes, its likely an issue with your input data / possible data format limitation.
e.g. if you are trying to add 2 tiffs, from different extents, the resulting file may exceed the maximum TIFF file size / maybe an individual calculated cell value, ends up larger than the range the TIFF format allows. (Guessing without seeing your data!)
Hi Luke, yes, previously arcpy python.exe offten crashed with an error "Process finished with exit code .....". I fixed the arcpy bug according this post:
So, now, arcpy still stop working randomly, but no error returned.
Are you running the python script in an IDE or in a Windows cmd?
Same error happened from both IDE or in a Windows cmd.
When dealing with large raster datasets the system memory can sometimes be the issue - when your script runs do you hit the cap on your RAM?
I have run into this issue in a few cases for example with high resolution height maps of large surface areas - you can avoid it by making use of scratch workspaces and writing intermediate rasters to disk, then explicitly calling del on the raster to free up the space held in memory. It does slow down the overall script performance to work from disk so you'll need to weigh the trade-off of speed vs. file size limitations.
My laptop has 12GB memory, but the used memory is less than 5GB. So, I'm sure the memory is enough for the task. However, you could be right because ArcGIS is still using 32-bit Python, it could not used memory larger than 4GB. However, arcpy is really very weak in supporting 64-bit Python. But I'm pretty sure this crucial bug in Arcpy. ESRI should investigate and fix it as soon as possible.
Same issue have been reported online:
such as: