laptop and a wrench

Bug

Custom import/export tool created with the Data Interoperability extension runs sucessfully from Python, but when added in as a script tool in ArcToolbox, it fails because it does not recognize the Spatial ETL tool.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM006088
SubmittedJanuary 16, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Version Fixed9.3
StatusFixed

Workaround

The only workaround I have seen at this point is with Pythons spawnv method.# Main scriptimport arcgisscripting, os, sysgp = arcgisscripting.create()#you will need to set the correct path information to python.exe on your machinepythonPath = '<a href="file:C://Python24//python.exe'" target="_blank">C:\\Python24\\python.exe'</a>#Reference to the second scriptETL = '<a href="file:C://Incidents//Active//540203//SpawnTest//ETL_Tool.py'" target="_blank">C:\\Incidents\\Active\\540203\\SpawnTest\\ETL_Tool.py'</a># just an example of passing messages between the two scriptsname = sys.argv[1]#create a list for the parameters for the second script parameterList = []parameterList.append('python.exe')parameterList.append(ETL)parameterList.append(name)#run the second script in a new instance of python and populate the scripts parameters with the appropriate values os.spawnv(os.P_WAIT, pythonPath, parameterList)print "End of script"del gp#########################################script called from spawnvimport os, sys, arcgisscripting# Create the geoprocessor object.# The memory used by this process will clear as soon as the process is completedgp = arcgisscripting.create()#Gets the values from the first scriptname = sys.argv[1]print "Got the correct name: " + name# Load required toolboxes...gp.AddToolbox("C:/Documents and Settings/john4818/Application Data/ESRI/ArcToolbox/My Toolboxes/ETL.tbx")#gp.setproduct("ArcView")#gp.setproduct("ArcEditor")# Local variables...test3_dwg = "<a href="file:C://Incidents//Active//540203//test22.dwg" target="_blank">C:\\Incidents\\Active\\540203\\test22.dwg</a>"New_Personal_Geodatabase_mdb = "<a href="file:C://Incidents//Active//540203//New" target="_blank">C:\\Incidents\\Active\\540203\\New</a> Personal Geodatabase.mdb"gp.Toolbox = "C:/Documents and Settings/john4818/Application Data/ESRI/ArcToolbox/My Toolboxes/ETL.tbx"# Process: Spatial ETL Tool...gp.SpatialETLTool("'<a href="file:C://Incidents//Active//540203//New" target="_blank">C:\\Incidents\\Active\\540203\\New</a> Personal Geodatabase.mdb'", test3_dwg)del gp

Steps to Reproduce

Bug ID: NIM006088

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options