I am trying to run this ArcPy example from ESRI TraceGeometricNetwork example 2
# Import arcpy module
import arcpy
# Local variables:
Water_Net = "C:/GeometricNetworks/Montgomery.gdb/Water/Water_Net"
Flags = "C:/GeometricNetworks/Montgomery.gdb/Water/Flags"
Water_Net_2 = "Water_Net"
# Process: Trace Geometric Network
arcpy.TraceGeometricNetwork_management(Water_Net, Water_Net_2, Flags, "FIND_PATH", "", "", "Friction_Factor", "Friction_Factor", "", "NO_TRACE_ENDS", "", "", "", "AS_IS", "Friction_Factor", "Friction_Factor", "1-10", "AS_IS")
but I am getting this error on running the code
Message File Name Line Position Traceback __call__ C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\netref.py 196 syncreq C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\netref.py 71 sync_request C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py 431 serve C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py 379 _recv C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py 337 recv C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\channel.py 50 read C:\Program Files (x86)\PyScripter\Lib\rpyc.zip\rpyc\core\stream.py 166 exceptions.EOFError: [Errno 10054] An existing connection was forcibly closed by the remote host
Can you please let me know what is happening? and How I can fix this?
Have you tried running this script in IDLE rather than PyScripter, but I don't think that should make any difference.
Has someone else got this network fc open with ArcMap?
Hi Neil,
I didn't try to run the code on any other IDLE as the Example one of the Geometric Network at the same page is working perfectly.
The only difference between this example and first one is the Example 2 is using Filter Weight called Friction_Factor with a weight filter of 1 to 10.