Spatial ETL Tools won't run "AttributeError: 'module' object has no attribute, etc."

5426
17
07-15-2014 08:45 AM
ChrisRado
New Contributor II

I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task.

 

Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line.

 

If I try to run the tools from the DOS window, as would be done via python script for a scheduled task, arcpy cannot find the tools, although it does load the toolbox.

 

In the attached screenshot: 1) I open a cmd.exe window; 2) start python; 3) import arcpy; 4) Import my toolbox, which is verified as loaded on the next line; 5) Use arcpy.ListTools to see what tools are loaded. the result is "[]", meaning no tools are recognized from this tool box; 6) I use the same ListTools to show the Spatial Analyst tools that were loaded by import arcpy; 7) I attempt to execute one of the tools from my toolbox and forget a " (my mistake!); 😎 I attempt to execute one of the tools from my toolbox and receive the message "AttributeError: 'module' object has no attribute 'CopyFeatureClass_newgpetl'".

 

What is preventing my tools from being recognized from the DOS CMD.EXE window while ArcCatalog and ArcCatalog Command Line can run them?

 

ToolsNotLoaded.PNG

0 Kudos
17 Replies
ChrisBlinn1
Occasional Contributor

It turned out 64 bit background processing was installed.  Uninstalling this fixed the issue.

0 Kudos
Jim_Gay
New Contributor III

I have the same issue.

Proper extensions are checked out and the correct toolbox is imported.

None of the problematic extensions are installed.

64 bit background processing is not installed.

My command looks like this:

arcpy.SpatialETLTool_cdwdev(Driving_Distance_gdb, Destination_ODBC_3_x_Dataset_)

Error message:

AttributeError: 'module' object has no attribute, 'SpatialETLTool_cdwdev'

My alias of cdwdev is set correctly. 

Any ideas?

0 Kudos
StephanieRinguet2
New Contributor III

Hello,

did you evey figure this out? I have the same issue.

0 Kudos
ChrisRado
New Contributor II

Hi Stephanie,

This was the first thing that helped, which may or may not solve your problem:

The key thing that I am missing (in this case) that causes the "AttributeError: 'module' object has no attribute..." is that I forgot to check out the Data Interoperability extension, with this:

 

arcpy.CheckOutExtension("DataInteroperability")

The other was that Workflow Manager could not be installed on the same server.

We ended up just getting an upgrade to the full version of FME desktop ESRI Edition. If you have the Data Interop extension you can get the upgrade for $800 from Safe Software:

ArcGIS Data Interoperability & FME Desktop Comparison 

Hope one of those options works out for you!

Chris

StephanieRinguet2
New Contributor III

Thank you Chris for your answer!

Yes Data Interop extension is checked out, we don't have Workflow Manager installed on that server, and I am using the toolbos aliases in my script. Who knows what's going on, and apparently ESRI Tech Support is backed up during this coronavirus time, so I guess I may just have to launch my Spatial ETL toll manually for teh time being. Thanks for sharing the upgrade option, I'll bring this up to my manager! I'm taking that you haven't had any issues automating tools with the full FME version?

0 Kudos
ChrisRado
New Contributor II

No problems automating when we run the FME workspaces via .bat file on Task Scheduler.

StephanieRinguet2
New Contributor III

Convincing argument! Thank you.

0 Kudos
HalilSiddique
Occasional Contributor II

Has anyone been able to get this to work? Works fine when runnining is VS Code and ArcGIS Pro, but cannot get it working on ArcGIS Enterprise (10.8.1).

😞

0 Kudos