tpcolson

Python runs in window but not standalone

Discussion created by tpcolson on Sep 24, 2012
Latest reply on Sep 24, 2012 by tpcolson
The following works fine in the Python Window in Arc Catalog 10.1:
arcpy.ExtractData_production(r'Database Connections\Fish.sde\fish.DBO.Brook_Trout_Distribution',r'X:\GIS_final\data\basedata\basemap\Data\Working\test.gdb',"DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","")

<Result 'X:\\GIS_final\\data\\basedata\\basemap\\Data\\Working\\test.gdb'>


But when I try

import arcpy
import arcpy
arcpy.CheckOutExtension("Foundation")
try:
    arcpy.ExtractData_production
    ("X:/GIS_final/data/basedata/basemap/Data/Working/Fish.sde/fish.DBO.Brook_Trout_Distribution",
     "X:/GIS_final/data/basedata/basemap/Data/Working/Test.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","")
except Exception as e:
    print e.message
    arcpy.AddError(e.message)



in Idle, absolutely nothing happens. I have tried every permutation of forward slash, back slash, hard-coding the sde connection string, still nothing.

Outcomes