English

Error: AttributeError: 'module' has no attribute when calling Spatial ETL tool

Error Message

When calling a Spatial ETL tool in a standalone Python script in ArcGIS 10.0, the following error may be encountered: "AttributeError: 'module' object has no attribute."

Cause

In previous versions of ArcGIS, one could call a Spatial ETL tool as long as the Data Interoperability extension was checked in both ArcMap and ArcCatalog.

In ArcGIS 10.0 the Data Interoperability extension must be checked out inside of the standalone Python script in order to successfully call and use a Spatial ETL tool.

Solution or Workaround

The following information is needed to avoid the 'module has no attribute' error and successfully call a Spatial ETL tool:

  1. Open the Python script for editing.
  2. Copy and paste the following code into the Python script after importing the arcpy module and before using the Spatial ETL tool.
    Code:
    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)