Using the Data Interoperability tool, Quick Export, from Python

3497
1
Jump to solution
12-21-2012 04:58 AM
Hampshire_County_CouncilGIS_Te
New Contributor II
Hi,

I'm writing a Python script to work with ArcGIS 9.3.1 and when I try to use the "Quick Export" data interoperability tool in Python, I can only get it to export to the file types that don't require the data interoperability licence, e.g. GMLSF.  When I try any of the licensed file types I get this error message:


[INDENT]FME API version of module 'MITAB' matches current internal version (3.4 20081031)
Module 'MITAB' is not licensed for use with this FME edition[/INDENT]


Has anyone had a similar problem?  I've applied suggestions made in other posts on the web that relate to similar issues - I'm checking out the licence and setting the toolbox - but it still doesn't work:

import arcgisscripting, string gp = arcgisscripting.create(9.3)  # Check out the Data Interoperability Extension gp.SetProduct("ArcInfo")  gp.AddToolbox("C:\Program Files\ArcGIS\ArcToolBox\Toolboxes\Data Interoperability Tools.tbx") gp.Toolbox = "interop"  # Put in error trapping in case an error occurs when running tool try:     # Check for the data interoperability licence     if gp.CheckExtension("DataInteroperability") == "Available":         print gp.CheckExtension("DataInteroperability")         gp.CheckOutExtension("DataInteroperability")         print "Data Interoperability licence available and checked out"     else:         raise "LicenseError"      # Variables     FC_workspace = "***"     FC_name = "***"     FC_path = FC_workspace + FC_name     FL_name = "***"     Output_FC = "***"     Export_output = "mitab,C:\\temp\\Scripts\\" + Output_FC     FC_query = "***"      # Make a feature layer from the feature class     gp.MakeFeatureLayer(FC_path, FL_name)     print "Feature layer created"      # If a query exists, run it against the feature layer     if len(FC_query)!=0:         gp.SelectLayerByAttribute(FL_name, "NEW_SELECTION", FC_query)         print "Selection completed"     else:         print "No query run"      # Write the selected features to a new TAB file     gp.QuickExport_interop(FL_name, Export_output)     print "TAB export completed"      gp.CheckInExtension("DataInteroperability")     print "Data Interoperability extension checked in"      except "LicenseError":     print "Data Interoperability license is unavailable"    except:     # If an error occurred, print the message to the screen     print "==ERROR=="     print gp.GetMessages()


Any help would be greatly appreciated.

Thanks,
Dave
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Hampshire_County_CouncilGIS_Te
New Contributor II
Hi,

I've been working with Esri UK to solve this, and it turns out that the problem was due to ArcLogistics also being installed on the server running the python script:

...I believe that you are experiencing a similar bug: NIM072147 (http://support.esri.com/en/bugs/nimbus/TklNMDcyMTQ3).

This bug, although stated as being discovered in version 10 of the software, fits the error message you have been receiving:
???Installing Data Interoperability on a system with both ArcGIS Desktop and ArcEngine Version 10 causes the Data Interoperability functionality to fail. The error returned is "Module XXXXXX is not licensed for use with this FME edition." This happens when doing a quick export with Data Interoperability, and the user does not have a valid license for Data Interoperability in both ArcGIS Desktop and ArcEngine.???


ArcLogistics is built on ArcGIS Engine components, which could well explain why you are experiencing this issue.


This problem is fixed in a later service pack for v10.0, but remains an issue in v9.3.

Hope this helps someone.

Thanks,
Dave

View solution in original post

0 Kudos
1 Reply
Hampshire_County_CouncilGIS_Te
New Contributor II
Hi,

I've been working with Esri UK to solve this, and it turns out that the problem was due to ArcLogistics also being installed on the server running the python script:

...I believe that you are experiencing a similar bug: NIM072147 (http://support.esri.com/en/bugs/nimbus/TklNMDcyMTQ3).

This bug, although stated as being discovered in version 10 of the software, fits the error message you have been receiving:
???Installing Data Interoperability on a system with both ArcGIS Desktop and ArcEngine Version 10 causes the Data Interoperability functionality to fail. The error returned is "Module XXXXXX is not licensed for use with this FME edition." This happens when doing a quick export with Data Interoperability, and the user does not have a valid license for Data Interoperability in both ArcGIS Desktop and ArcEngine.???


ArcLogistics is built on ArcGIS Engine components, which could well explain why you are experiencing this issue.


This problem is fixed in a later service pack for v10.0, but remains an issue in v9.3.

Hope this helps someone.

Thanks,
Dave
0 Kudos