ERROR
Running in-process python scripts in ArcToolbox produces the following error:
"<type 'exceptions.IOError'>: [Errno 9] bad file descriptor".
Print statements inside a loop within the script; for example, when using Cursors.
Code:
import arcgisscripting
gp = arcgisscripting.create(9.3)
for x in range(1,2500):
gp.addmessage(str(x)) # this line only necessary to track where it fails
print x
Code:
try:
print "some statement"
except IOError:
pass
Get help from ArcGIS experts
Download the Esri Support App