Arcpy Script Tool Issue with Euclidean Distance

1219
1
07-04-2011 01:33 PM
GraceCai
New Contributor
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
Tags (2)
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus
your destination folder contains a space and a $ neither of which behave well with most SA functions, change source and/or destination folders to be compliant (ie c:\test )
0 Kudos