Python Script Error

3835
11
02-02-2011 07:27 PM
jamesborris
New Contributor III
Whenever i try to run a simple python script i get this error

ERROR 000714: Error in script vt17.
Error in executing: cmd.exe /C I:\GIS\......

I can run a script from the python command window and from IDLE but when i add GetParameterAsText or try to run anything from toolbox i get that error

here is the simple buffer script:

import arcpy
import os
from arcpy inport env
env.workspace = I:\GIS
arcpy.SetProduct("ArcEditor")
shape = arcpy.GetParameterAsText(0)
output = arcpy.GetParameterAsTest(1)
arcpy.Buffer_analysis(shape, output, "1000 Feet", "", "", "", "")


any ideas? I installed the Win32 updates and tried it a million different ways. Please help.
Tags (2)
0 Kudos
11 Replies
MichaelStead
Occasional Contributor III
You have a typo on line 3. Is that in your script? I think your path has to be in double quotes too.
0 Kudos
jamesborris
New Contributor III
import arcpy
import os
from arcpy import env
env.workspace = "I:\GIS"
arcpy.SetProduct("ArcEditor")
shape = "I:/GIS/RPMScript/Shapes/shape.shp"
arcpy.Buffer_analysis(shape, "I:/GIS/RPMScript2", "1000 Feet", "", "", "", "")

If this script will work in the python command line in ArcMap why do I get that cmd error when i try and run it in toolbox? I am using the python that came with the Arc10 release.
0 Kudos
ChrisFox3
Occasional Contributor III
James,

The error indicates you are running the python script out of process. Could you try checking on the property of the script tool to run the Python script in process. I don't see anything that stands out for why it would fail out of process but this would be worth a try.
0 Kudos
jamesborris
New Contributor III
it is running in process. still not working. same error.
0 Kudos
ChrisFox3
Occasional Contributor III
Hi James,

At this point I would encourage you to contact Technical Support for this issue. They will have the resources and knowledge to appropriately assist you in this matter.
0 Kudos
RDHarles
Occasional Contributor
Your going to want to change this:

env.workspace = "I:\GIS"


to this:

env.workspace = "I:/GIS"
0 Kudos
EdEngle
New Contributor III
output = arcpy.GetParameterAsTest(1)


spelling errror here as well...  should be

output = arcpy.GetParameterAsText(1)
0 Kudos
DanPatterson_Retired
MVP Emeritus
Grief...good catch...
0 Kudos
MichaelStead
Occasional Contributor III
Reminds me of one of those "Spot the Differences" cartoons. Maybe use a python editor that marks up syntax to catch some of those. Should make indenting and brackets and such easier too.
0 Kudos