Running Spatial ETL (10.1) tools from Python

3906
2
08-31-2012 07:40 AM
StephanieWidas
New Contributor III
I am trying to run several spatial ETL tools from a python script.  The tools run fine in Model Builder, but not when called from Python.  I receive the following error: "AttributeError: 'module' object has no attribute..."

I found the following thread:
http://support.esri.com/en/knowledgebase/techarticles/detail/38563

I added the code that it suggested to check for license errors.  It raises the license error and tells me that the license is unvailable.  I added a line to check the status of the extension - arcpy.CheckExtension("DataInteroperability") - and found that it was NotLicensed.

I'm running Windows Server 2008 R2, with ArcGIS Desktop and Server 10.1.  My Data Interoperablity license is only for Desktop, not Server. 

I tried setting a Windows Environment variable DI_DESKTOP to force the use of the desktop license as described here - http://support.esri.com/en/knowledgebase/techarticles/detail/37392.  Not exactly the same problem, but thought it was worth a try.  It didn't fix the problem. 

Does anyone know what I need to do so that I can run the ETL tools from Python?  Is it a conflict with server and desktop?

Thanks,
Stephanie
0 Kudos
2 Replies
StephanieWidas
New Contributor III
Additional info:
When I use arcpy.ProductInfo() it returns ArcServer. 

Can I add something to my script to just use a Desktop license instead?  I tried using "import arcview" and "import arcinfo" statements before importing arcpy, but that just gives me an error - - RuntimeError: ERROR 999999: Error executing function. 

We really need to be able to run these ETLs from a scheduled Python script on a server that also has ArcGIS Server installed on it.  Is there a way to make this work?  Hopefully I'm just missing something obvious.

Thanks again,
Stephanie
0 Kudos
SrijanaTuladhar
New Contributor III

Hi Stephanie,

I have a same question, I came across your thread regarding converting the ETL tool into python script and schedule to run automatically in daily or weekly basis. Did you find a solution? If so, would you mind helping us. Thanks in advance.

ST

0 Kudos