laptop and a wrench

Bogue

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.

Dernière publication: August 25, 2014 No Product Found
Numéro d’ID de bogue NIM006088
EnvoiJanuary 16, 2007
Dernière modificationJune 5, 2024
S’applique àNo Product Found
Version trouvée9.2
Version de correction9.3
StatutFixed

Solution de contournement

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

Étapes pour reproduire

ID de bogue: NIM006088

Logiciel:

  • No Product Found

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement