Select to view content in your preferred language

ArcMap 10.6 shutting down - Topo to Raster (Arcpy)

1349
11
10-06-2019 07:49 PM
FelipeLeite_Nisiyama
Emerging Contributor

Hi,

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?

Kind Regards, 
Felipe. 

0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus

What parameters are you using?

Properties of the raster?

Did you see the section in the help on the Margin parameter?

Topo to Raster—Help | ArcGIS Desktop 

How Topo to Raster works—Help | ArcGIS Desktop 

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.

0 Kudos
FelipeLeite_Nisiyama
Emerging Contributor

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?

0 Kudos
SteveLynch
Esri Regular Contributor

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?

0 Kudos
FelipeLeite_Nisiyama
Emerging Contributor

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. 

Thanks!

0 Kudos
DanPatterson_Retired
MVP Emeritus

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.

Background Geoprocessing (64-bit)—Help | ArcGIS for Desktop 

If it is external then you need to ensure that the correct python is executing. 

You can use

import sys

sys.executable

to ensure that c:\Python27\ArcGISx6410.2\python.exe is the running version.

Alternately... use Pro, it is 64 bit

0 Kudos
FelipeLeite_Nisiyama
Emerging Contributor

Correctly, I refer myself to the builtin python window

0 Kudos
SteveLynch
Esri Regular Contributor

Background geoprocessing is by default = 32 bit, to get the 64 bit version requires an additional install.

Felipe,

- from the UI it succeeds in background and in foreground, correct?

- try sending the output raster to Esri grid or .tif

FelipeLeite_Nisiyama
Emerging Contributor

- 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. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

You had better post your code and...

do this in your command line to see what version of python is running

import sys
sys.executable
0 Kudos