A python script was written about 18 months ago by a person who has now left. It produced the required outputs then. I've been asked to run it again but with different (finer resolution) data inputs. The input dataset has been split into 20 sub-sets of approx 2,700 data points each. However, the script crashes ("python.exe has stopped working") after approx 300 data points have been processed (range 295 to 306 and does NOT always fail on the same record).
As its old(ish), the script was written using arcgisscripting and not arcpy. Broadly it does the following using cursors: a) For a given point, calculate the cost distance (using gp.CostDistance_sa) with a cutoff of 60 minutes travel time.
b)Calls gp.ExtractValuesToPoints_sa to extract all the individual values at each data point and outputs a feature class to a file geodatabase.
c) Reads the feature class created in b) above and writes the values to a CSV file (omitting any points with "No Data" (value -9999)).
Repeats a), b) and c) for all remaiming data points in the input file.
Processing time is approx. 1 minute per data point on average. The PC has a quad core Intel i7-2720QM CPU running at 2.20GHz with 8GB RAM running Windows 7 (64 bit).
Python version is 2.6.6 (shell also states "[MSC v,1500 32 bit (Intel)] on win32).
Not sure if relevant but ARCMAP 10.0 (SP4) is also installed.
I've tried running it on a different PC (so far without crashing). Currently the job is running successfully (but more slowly) on an older PC and has reached 419 records without crashing. This has an Intel Core 2 DUO E7500 processor running at 2.93GHz with 4 GB RAM and 64bit Windows 7.
Python version 2.5.1 (shell also states "[MSC v,1310 32 bit (Intel)] on win32).
ARCMAP 9.3 is installed (no mention of any Service Packs).
Please can someone offer some advice about why the script seems to work for a while then crash and how to resolve it? The fact that a different PC appears (so far) to handle the script suggests something "environmental".
Thanks in anticipation.
Thanks to everyone for your suggestions. I'll try these. As an update, the PC running ARCGIS 9.3 is still successfully processing the data and has reached 1,300 data points processed (and still counting). A colleague also ran the data on their PC running ARCGIS 10.1 - it crashed after 267 records on two seperate occasions. Although not conclusive, the common thread seems to be that ARC 9.3 will process the data but ARC 10.x will not.
Any further contributions gratefully received.