Select to view content in your preferred language

Module import appears to fail in python tool box published as geoprocessing tool (ERROR 000816: The tool is not valid.)

4144
10
03-14-2021 11:47 AM
DonMorrison1
Frequent Contributor

We recently upgraded our ArcGIS server from 10.6 to 10.8.1 and I later noticed that after publishing a geoprocessing tool, the REST service returns an error when accessed:

ERROR 000816: The tool is not valid.

The problem appears to be caused by an unresolved import. The import used to work but now I believe it is failing.  I was able to recreate the error with the default toolbox - adding the lines below to the .pyt file

sys.path.append(r'C:\Git_Repository\ROW\DEV\ROW_as_habitat\row\consolidation')
import empty

The tool runs on ArcGIS Pro OK and publishes OK. But the geoprocessing REST service fails.

When I copy the import file to the toolkit directory, there is no problem. The problem only happens when python has to find it outside of the current directory.  That tells me that the problem has something to do with how the consolidation is handled.

I assume I'll have to report this to ESRI - has anybody else had this problem?

I'm running this on Windows, ArcPro 2.6.1, and ArcGIS Server 10.8.1

 

 

10 Replies
GisNavy
Occasional Contributor

Is there any news about this?

I have the same issue with arcgis pro 2.9 and arcgis server 10.8.1

0 Kudos