Using Data Interoperability in model as scheduled process

966
3
09-21-2011 08:57 PM
ShaunWeston
Occasional Contributor
I have built a model, which imports CSV files using the Quick Import tool and then copies them into a SDE database. This works fine if I run it from ArcCatalog. However if I set this process up as a scheduled service in python, I get the following error:

Could not create reader: Module 'CSV' is not licensed for use with this FME edition

Data Interoperability is licensed on ArcGIS Desktop and Server, so not sure what is going on here?
0 Kudos
3 Replies
MitaHajirakar
New Contributor
Hi Shaun,

Can you provide some more details about the scheduled service in Python?  That sounds like something we may need to fix and we'd like to try to reproduce it in order to investigate. 

In the meantime, could you try exporting the model to Python, and running the Python script from the command line? 

Kind regards,
Mita Hajirakar
Safe Software, Inc.
0 Kudos
ShaunWeston
Occasional Contributor
Hi there Mita,

Thanks for the feedback. Yeah I have it working now, by putting the entire code into one python script. It does not seem to like referencing tools with "quick import" in them.

So, doing this:

arcpy.gp.toolbox = "C:/Users/gisarc/AppData/Roaming/ESRI/Desktop10.0/ArcCatalog/MDC_Core.sde/MDC_Core.SDE.Toolbox";

arcpy.gp.RatesImport(var)

(The RatesImport is the name of the model and has the quick import tool in it)

Will cause the error in my first post.
0 Kudos
MitaHajirakar
New Contributor
Hi Shaun,

You're very welcome.

There is a known issue in ArcGIS 10.0�??s export to Python whereby the line of code required to check out the Data Interoperability extension is not added automatically - once you adds it manually it should work. The line is:

gp.CheckOutExtension("DataInteroperability")

Kind regards,
Mita Hajirakar
Safe Software, Inc.
0 Kudos