We recently upgraded our test-environment from ArcGIS Server 10.5.1 to 10.9.1. Since this is the migration-version where we should start to use ArcGIS Pro we planned ahead of time and renewed our custom GeoProcessing tools. Taking advantage of the new Arcpy-library available in ArcGIS Pro's Python 3.X.
Everything runs fine in Python and ArcGIS Pro. No code issues or import issues seems to pop up, but the moment we publish the tools to the new ArcGIS Server 10.9.1 we get this response every time we run the tools: "The tool is not valid".
We have encountered this before, and it had to do with import issues and third party libraries, though we alreay fixed that previously. Now we've gone through it again and it seems like everything is as it should. We even added backwards-compatibility to some of the tools so we could test them in ArcMap, and ArcMap also runs the tools seamlessly.
We also found that by publishing the tools from ArcMap they also work on the new ArcGIS Server 10.9.1, but not when published from ArcGIS Pro. We find this rather strange, and wonder if the ArcGIS Server changes python-environments depending on which plattform is used to publish the tools...
Anyway we wish to publish ALL the tools through ArcGIS Pro, especially since some of the are dependent on the new functions and revisions done for ArcGIS Pro's Arcpy-library.
Does anyone else recognize this problem? Even better, does someone know how to fix it?