gracecai

Arcpy Script Tool Issue with Euclidean Distance

Discussion created by gracecai on Jul 4, 2011
Latest reply on Jul 4, 2011 by Dan_Patterson
Hi,

I've been having trouble executing the EucDistance tool using arcpy. When I run my script in Python Shell, everything is well. But when I import the script into a tool box and run it from there, things start to fall apart. Currently I'm testing out a smaller script with just EucDistance. Right now I get this message:

O:\EPScratch\Grace\data\apda_bc.shp (input)
O:\EPScratch\Grace\scratch\test1 (out path)
<class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function.
The item was not found. [ItemType: {00000000-0000-0000-0000-000000000000}]
No spatial reference exists.
ERROR 010029: Unable to create the raster \\CAL-S-01005\cag605-f$\Cached\My Documents\ArcGIS\Default.gdb\EucDist_shp2. Distance mapping is failed
ERROR 010067: Error in executing grid expression.
Failed to execute (EucDistance).

Failed to execute (TESTER).

Right now I have the following environment settings:
arcpy.CheckOutExtension("spatial")
env.overwriteOutput=True
env.cellSize = 50
env.extent = "O:\EPScratch\Grace\data\Ext.shp"
env.outputCoordinateSystem ="O:\EPScratch\Grace\data\Ext.shp"

Past errors I've gotten with EucDistance included "Invalid SQL Statements". The funny thing is when I use arcpy.gp.EucDistance_sa(inRas,outRas) I don't get such errors (Currently I'm using x= EucDistance(inRas) then x.save(outRas)) . I'm so confused!

Thanks in advance for all of your time!

Grace

Outcomes