Error executing tool: ERROR 000816: The tool is not valid.

297
2
Jump to solution
02-23-2024 03:42 AM
Thomas_Puthusserry
New Contributor III

We have a custom GP service - basic python script - (enable and register enterprise geodatabase) developed and deployed in 10.9 and working. Recently the enterprise suite was upgraded to 11.1. The GP service no longer works in the server. (the other standard GP services 


Tested the function of the script in ArcGIS Pro and it works fine.


Published as a GP Service to run from the server and it throws the error as below:


Unable to complete operation.
Error executing tool. Tool test egdb : ERROR 000816: The tool is not valid.

looking at the envs folder in the Python folder (this is the dev instance and had many envs used to test the tools) (C:\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs) I see few folders as in the attached file. Is there a conflict here? Is there a configuration anywhere which tells Python to use a specific folder from envs folder?

Just for reference: I have a test env, where the same GP tool works fine, and the envs folder in Python directory only has one folder: arcgispro-py3

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
AlexanderDanielPratama
Esri Contributor

This is sometime might happen in the gp service when updating the system. I do always have problem with them. The Error you encounter is probably bugs that Esri Developer never heard of them. 

If you might guess the error cause from the environment, I suggest you need to run the python of arcgis server in your server. Then, run your script in the same environment  (not in the web).

and if you encounter the same problem, I guess there is a problem in conda arcgis. You can try this method Deploy custom Python packages for ArcGIS Server—ArcGIS Server | Documentation for ArcGIS Enterprise to change the conda environment using proswab then restart your Arcgis server service. 

Finally, if you still have the same issue, maybe you need to contact ESRI tech support, or if you are still curious, you can try another publish script or rollback your server to the state before the upgrade

View solution in original post

2 Replies
AlexanderDanielPratama
Esri Contributor

This is sometime might happen in the gp service when updating the system. I do always have problem with them. The Error you encounter is probably bugs that Esri Developer never heard of them. 

If you might guess the error cause from the environment, I suggest you need to run the python of arcgis server in your server. Then, run your script in the same environment  (not in the web).

and if you encounter the same problem, I guess there is a problem in conda arcgis. You can try this method Deploy custom Python packages for ArcGIS Server—ArcGIS Server | Documentation for ArcGIS Enterprise to change the conda environment using proswab then restart your Arcgis server service. 

Finally, if you still have the same issue, maybe you need to contact ESRI tech support, or if you are still curious, you can try another publish script or rollback your server to the state before the upgrade

Thomas_Puthusserry
New Contributor III

Thanks @AlexanderDanielPratama  the issue seems to be with Python envs in the server. The server machine had different python packages installed and the message while trying to activate arcgispro-py3 env was 

The environment "arcgispro-py3" contains multiple NumPy installations based on its conda metadata. This typically is caused by upgrades or reinstallation, and should be resolved before trying to use the environment with ArcGIS Pro.

Ideally there should be a way to clean the env folder and get the updated version. I tried to clone it and get the package updated, then activated it. It didn't work. @JonathanQuinn is there a way to fix this directly in the env folder?

I then copied the same  env folder from one of the other upgraded server (11.1) and made that active  using proswap.  Once the service restarted the GP tools working as expected.

Many thanks for pointing me to this, but I couldn't find a way to resolve this except by copying the env folder.

Best Thomas 

0 Kudos