Unable to share a custom toolbox containing the 'arcpy.analysis.Select' function as a web tool using ArcGIS Pro 2.7.1 to the ArcGIS Enterprise 10.8.1 and 10.7.1 portals with the "Staging Failed" error message returned.
This issue is not reproducible in the latest version based on the information provided. If this issue persists, contact Esri Support Services and reference this issue's record number.
解决办法
Delete the 'arcpy.analysis.Select' function from the toolbox's script.
Install ArcGIS Pro 2.6.0.
Replace 'arcpy.analysis.Select' with getattr(arcpy, "Select_analysis").