I preface all of this by explaining that I'm not a Python developer (I usually use PHP and Java) nor do I use the ArcGIS product. I've been attempting to use Python to assist a colleague but I'll try to provide all the information I can.
Our aim is to use a Python script that utilises toolboxes to update data. There are two sources of data for the model: one from DataInteroperability and the other files on a mapped drive. My current code is below:
import arcpy
if arcpy.CheckExtension("DataInteroperability") == "Available":
arcpy.CheckOutExtension("DataInteroperability")
print "Checked out \"DataInteroperability\" Extension"
else:
print "Data Interoperability license is unavailable"
arcpy.ImportToolbox("G:/data/Toolbox/ScheduledLandChargesConversion.tbx","Land")
arcpy.Land.ScheduledLandCharges("Interoperability Connections\\ScheduledConversionLandCharges.fdl\\Assets_of_Community_Value Polygon","Q:\\Shp_Files\\Land_Charges")
When this is run I receive the following error:
Traceback (most recent call last): File "Jonathan2.py", line 10, in arcpy.Land.ScheduledLandCharges("Interoperability Connections/ScheduledConversionLandCharges.fdl/Assets_of_Community_Value Polygon'","Q:\Shp_Files\Land_Charges")
File "G:\data\Toolbox\ScheduledLandChargesConversion.tbx", line 25, in ScheduledLandCharges
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Assets_of_Community_Value Polygon: Dataset Interoperability Connections/ScheduledConversionLandCharges.fdl/Assets_of_Community_Value Polygon' does not exist or is not supported
The value does not exist.
ERROR 000732: Input Features: Dataset 'Interoperability Connections/ScheduledConversionLandCharges.fdl/Assets_of_Community_Value Polygon'' does not exist or is not supported
Failed to execute (ScheduledLandCharges).
I think this is because I'm passing the model the wrong kind of input, as it's after a feature layer. I've copied the text for the DataInteroperability "path" from the toolbox's Python export, so that may be what's going wrong. The model in question (ScheduledLandCharges
) requires the following:
Help on function ScheduledLandCharges:
ScheduledLandCharges(Assets_of_Community_Value_Polygon=None, Land_Charges=None)
ScheduledLandCharges_Land(Assets_of_Community_Value_Polygon, Land_Charges)
(null)
INPUTS:
Assets_of_Community_Value_Polygon (Feature Layer)
Land_Charges (Folder)