I have not yet pulled this down to a code snippet that has just enough in it to reproduce the error below that I am getting when I run my code in IDLE.
pythonw.exe has stopped working
Windows is checking for a solution to the problem
However, I am seeing it when my script repeatedly runs Trace Geometric Network which I am doing to try and identify isolation valves for almost 1,000 locations on a water network.
These are a few lines from the code:
print_message("Trying to trace")
arcpy.TraceGeometricNetwork_management(
r"C:\Users\101791\test.gdb\WaterNetwork\WaterNetwork",
r"in_memory\WaterDistribution_Net",
r"C:\Users\101791\test.gdb\Flag",
"FIND_CONNECTED", "", "", "", "", "wSystemValve",
"TRACE_ENDS", "", "", "", "AS_IS", "", "", "", "AS_IS")
print_message("Traced OK")
and this is the ouput I get. The error in the image above occurs after it has run Trace Geometric Network eight times successfully immediately after printing "Trying to trace" the ninth time.
1
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV71818']
2
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV71818']
3
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV130266']
4
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV12053', u'RV415348']
5
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV12052', u'RV12051']
6
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV12060', u'RV12059']
7
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'RV12060', u'RV12061']
8
2074
Trying to trace
Traced OK
Isolation Valves for KCA 2074: [u'WSF405337']
9
2086
Trying to trace
If I try to start the process on the ninth flag pythonw.exe stops immediately. If I set my code to skip trying the 9-10th and 12-14th flags then all the others work until it gets to the 28th. The first failure occurs when the KCA value changes for the first time, but the 11th flag (which works) has the same KCA value of 2091 as the 12th-14th (which work) so particular KCA values do not appear to be the cause.
Does anyone have any thoughts on how I may be able to troubleshoot this?
I have a suspicion there may be some interplay between how much memory is needed to perform a geometric network trace and the way the Trace Geometric Network tool writes its result as an in_memory group layer.
I am using ArcGIS Desktop 10.2.1.01 on Windows 7 SP1.
No comments:
Post a Comment