[GIS] Using ArcGIS Data Interoperability tool in ArcPy

arcpydata-interoperability

I created an ArcGIS Interoperability Tool, which I like to use in my ArcPY script.
In order to find the correct code I created an ArcGIS Toolbox Model including my Interoperability Tool, and exported as an ArcPy script.

Everything looks fine, I checked google and stuff. I get an DataInterop license, I import the Toolbox with my Interoperability Tool (which uses an Alias). Then I define the input and ouput. When I try to start the Interopability Tool I get the following message :

AttributeError: 'module' object has no attribute

I didn't find anything useful on the internet which can be found with the above error message and Data Interoperability. Does somebody know how to use a self create Data Interoperability Tool with ArcPy?

Best Answer

The symptoms that you describe seem to be the same as those discussed in the Esri Knowledge Base Article 38563 entitled Error: AttributeError: 'module' has no attribute when calling Spatial ETL tool which recommends that you:

Copy and paste the following code into the Python script after importing the arcpy module and before using the Spatial ETL tool

class LicenseError(Exception):
    pass

try:
    if arcpy.CheckExtension("DataInteroperability") == "Available":
        arcpy.CheckOutExtension("DataInteroperability")
        print "Checked out \"DataInteroperability\" Extension"
    else:
        raise LicenseError
except LicenseError:
    print "Data Interoperability license is unavailable"
except:
    print arcpy.GetMessages(2)
Related Question