kessler

overwriteOuput works in ArcMap's Python Window but not in PythonWin

Discussion created by kessler on Dec 9, 2011
Latest reply on Apr 7, 2013 by dpringle
Hi all,

This has to be simple, but it's driving me a bit crazy at the moment. The following code works fine and allows overwriting when using the Python Window in ArcMap v10 sp3.

[INDENT]arcpy.env.workspace = "C:\\Data\\Assessors.gdb"
arcpy.env.overwriteOutput = "True"
arcpy.Buffer_analysis("FireCalls", "FireBuff", "1000 Meters")[/INDENT]

When I put this into a script in PythonWin and run it with the following code:

[INDENT]import arcpy
arcpy.env.workspace = "C:\\Data\\Assessors.gdb"
arcpy.env.overwriteOutput = "True"
arcpy.Buffer_analysis("FireCalls", "FireBuff", "1000 Meters")[/INDENT]

I get 'Ouput ... already exists' as an error.

I seem to have a basic problem here and I'm not figuring it out. I can even print the value of arcpy.env.overwriteOutput in the PythonWin program and it comes out as True. It just seems that ArcGIS is not recognizing this.

Am I doing something wrong?

Outcomes