Hi all! I developed a python toolbox for ArcGIS Pro (.pyt) which contains a tool that will generate one of three reports. The tool is supposed to perform queries, process the queried data and finally generate the report selected by the user. This tool has several optional parameters that can be selected by the user but only one required parameter - Report Type.

When I run this tool in ArcGIS pro, all three possible reports are generated successfully, and the tool returns the path to the generated file as output, no problems there.
My issues arise once I publish this tool as a Geoprocessing Service. To publish the tool, I right click on one of the successful runs from the history tab, and select Share As > Share Web Tool. I fill out the relevant information, analyze then publish.

The tool gets published successfully. Once I try to execute the published tool (In my case, I'm trying it from the map viewer) I'm getting an error message saying "ERROR 000820: The parameters need repair." - which is weird because the tool was ran in ArcGIS Pro, then published, so I'd think if there were any problems with the parameters, it should have raise errors prior to this point. Server Manager logs are not helpful either.


Originally I tried publishing this tool from ArcGIS Pro 3.5.2. When I did I got the error message "The tool Is not valid." I asked around the office and a coworker mentioned I should try publishing the tool from an earlier version, since the version of ArcGIS Enterprise where the tool being published to is 11.3. I started getting the "Parameter needs repair" message when I downgraded and published from ArcGIS Pro 3.4.2, and when downgraded and published again from ArcGIS Pro 3.3.7.

Finally and worth mentinong, this script makes use of the python-docx library, which I installed both in my local machine AND in the server where the tool gets published to. (Clone python environment, activate cloned environment, pip install python-docx)
Attached to this post I include a shortened version of the tool I'm trying to use once published. I have omitted all queries normally performed by this tool and have focused the code to just generate the report(s).
Any information that may help me troubleshoot this issue is greatly appreciated, thanks!