I'm quite new in using ArcPy and have been struggling with it. I was trying to run a python script that has a loop containing the Topo to Raster tool. The code runs smoothly just until this tool is executed, and at this moment ArcMap suddenly shuts down without any message. After a couple of tests I discovered that the script runs smoothly with the background processing option activated, and the shutting down just occurs when it's deactivated. I just can't let the background processing option activated since the computational time would be too large for the purpouse of the script.
Anyone has already experienced this type of problem? Any tips of how to fix it?
What parameters are you using?
Properties of the raster?
Did you see the section in the help on the Margin parameter?
The trouble shooting section in the last link has suggestions.
Memory resources is a big issue and you may need to tile the original or use a larger cell size.
Thanks for the quick reply. Actually, I have a felling that the problem is not parameter related.
I ran a test using a simple shapefile of elevation points (leaving the optional parameters as default) and, again, it runs perfectly with background processing option activated, but not with foreground processing. I also ran the code snippet of a sucessful manual topo to raster interpolation, but had the same problem. Just repaired ArcGIS installation, but the problem persists.
Can you think of anything else that could be causing the problem?
When it succeeds, what is the size of the output raster? (Right click on the raster layer and have a look at the number of columns and rows)?
Did you install Background 64 bit?
Does IDW succeed in foreground?
Are you running the geoprocessing tool from the UI or are you running it in the Python window?
1. When it succeeds I get a raster of 19200 cells (192 x 100) which is the result of interpolating a simple shapefile of 30 points with a cellsize of 30 m.
2. Checking in ArcGIS admnistrator I can't locate it.
3. Yep, I just got it to run sucessfully with the same inputs mentioned in 1.
4. When running topo to raster from the UI it always succeds, while in the Python window I am able to run it just with in foreground.
Felipe, you mean the builtin python window I presume
Any script or script tools you run while inside Desktop honors the background processing setting. If background processing is turned on, the scripts will execute in the 64-bit space.
If it is external then you need to ensure that the correct python is executing.
You can use
to ensure that c:\Python27\ArcGISx6410.2\python.exe is the running version.
Alternately... use Pro, it is 64 bit
Background geoprocessing is by default = 32 bit, to get the 64 bit version requires an additional install.
- from the UI it succeeds in background and in foreground, correct?
- try sending the output raster to Esri grid or .tif
- Yes, from the UI it succeds in both.
- I've just done it to both ESRI grid and .tif with no errors.
I noticed that when I run the script ArcGIS crashes when executing the "Computing min-max ranges", as this appears at the bottom left corner of ArcMap UI.