Select to view content in your preferred language

ERROR 000816: The tool is not valid.

16550
13
05-13-2016 01:42 PM
SergioFernandez1
Deactivated User

Hi, I'm trying to run a geoprocessing tool that I published and just get these errors:

ERROR 000816: The tool is not valid.

Error executing tool.

The process runs fine in ArcMap with a couple of layers loaded.  These layers' mxd is also published.

I wonder if the published geoprocessing tool doesn't find the required layers in the published service because I didn't reference them in any place.

Where I can set this reference?

Or can you give me any guidance regarding this error?
Thanks!

13 Replies
HélèneTouyéras
Frequent Contributor

I found a workaround on GIS Stackexchange. There is an interaction between versions of Python (32 bits or 64 bits) and arcpy tools. My simplistic python snippet is working if I call it with 32-bits python, and not with 64-bits python.

0 Kudos
MalcolmMeyer2
Frequent Contributor

I am having this same issue. The tool runs fine in ArcCatalog (10.7), and runs from from PowerShell, but when I run it via the Task Scheduler (in PowerShell or CMD) it fails with the 816 error. The python script is actually being called from a Node app, but this works fine when tested directly in PowerShell from within VS Code. Any thoughts would be helpful. I am running python from "C:/Python27/ArcGIS10.7/python.exe". All I want to do is dump SDE to a FGDB daily, unattended, but this task is proving extremely difficult. 

0 Kudos
MalcolmMeyer2
Frequent Contributor

Figured it out. I was using a custom tool and after moving that tool to the same location as the model toolbox and importing the custom toolbox into the python script it worked.

0 Kudos
DonMorrison1
Frequent Contributor

I know this is very old, but for the record, I started getting this error when I tried to import a python class that I created and placed in the same directory at the pyt file.  

from session_logger import SessionLogger

I can import modules OK from that directory but evidently I can't import class files. 

0 Kudos