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?
-
1Which version of ArcGIS are you using? You can edit your question to include this information. Welcome to GIS.SE!Paul– Paul2014年04月22日 21:27:52 +00:00Commented Apr 22, 2014 at 21:27
-
Perhaps the Alias is incorrect. You can use Arcpy to list the available tools and toolboxes.klewis– klewis2014年07月05日 15:25:22 +00:00Commented Jul 5, 2014 at 15:25
-
2I did have a conversation with ESRI, and it seems I run into a bug. The above error will occur if you try to run ArcPY externaly and try to run an Data Interoperability tool, and you have installed Production Mapping and/or the Workflow Manager. ESRI doesn know when it wil fixed it. My script did perfectly run externally when I deinstalled my production mapping and the workflow manager.wb1981– wb19812014年07月07日 12:35:19 +00:00Commented Jul 7, 2014 at 12:35
-
@user28510 Please post this as an answer and then accept it. After all it is the solution that worked, and others will discover the answer more easily when it's not buried as a comment.matt wilkie– matt wilkie2015年07月14日 19:48:58 +00:00Commented Jul 14, 2015 at 19:48
1 Answer 1
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)
-
Thank you for your answer, but the only thing is does, is getting a DataInteroperability License if it is available, but I already did this in my script.wb1981– wb19812014年04月24日 12:27:16 +00:00Commented Apr 24, 2014 at 12:27
-
@user28510 Perhaps you can include a working snippet from your script that includes this.2014年04月24日 21:06:38 +00:00Commented Apr 24, 2014 at 21:06