problem with script in PythonWin but not ArcMap's python window

543
0
08-09-2011 02:04 PM
TerryGiles
Occasional Contributor III
I have a simple script (below) which copies data from a Data Interop connection to a new file geodatabase. The script works fine in ArcMap's python window and in Idle but crashes PythonWin (see attached), which is what I prefer to work in. I'm running Win 7 (64bit), Python 2.6 (installed w/ ArcGIS), PythonWin build 212 (32bit, installed from the ArcGIS install disk), and ArcGIS 10 SP 2 with an ArcInfo license.

Anyone have any ideas why this might happen & how I can fix it?

Thanks, Terry

import arcpy, datetime, string

strInterop = 'Interoperability Connections\\IPHIS.fdl\\Samples'
strFolder = 'X:/Central/Temp'
strBase = 'iphis_' + string.replace(str(datetime.date.today()),'-','')
strDB = strBase + '.gdb'

arcpy.management.CreateFileGDB(strFolder,strDB,'9.3')    #crashes here in PythonWin
arcpy.management.CopyFeatures(strInterop,strFolder + '/' + strDB + '/' + strBase)
Tags (2)
0 Kudos
0 Replies