AnsweredAssumed Answered

Failure publishing Python tool that references a custom toolbox.. help

Question asked by peterlen on Mar 17, 2018

I am using ArcGIS 10.4.  I have a Python toolbox (.pyt) with a single tool.  That tool imports a custom toolbox with a single Java ArcObjects tool.  It all runs fine when I run the tool from ArcCatalog.  When I go to publish the result as a service, however, it fails.  It is failing because it is putting the custom toolbox with the Java ArcObjects tool into a file geodatabase that Esri created in the arcgisinput directory.  The Python tool references two items using a system file path: An MXD file and the custom toolbox (.tbx file).  During publishing, ArcGIS copies the MXD file to deployed area in the arcgisinput area.  When it comes across the reference to the path to the custom toolbox, however, it does not copy the toolbox file and put the file in the arcgisinput area like it did with the MXD file. Instead, it is adding the toolbox to a file geodatabase that ArcGIS creates.  There is no descriptive information in the failed result messages.  I have no idea why it failed but I know it is because of the custom toolbox and its path reference.  The ArcGIS Server Manager log does show some failure messages that there is a reference to not being able to find the resource in the geodatabase.  It does not say what resource, but I know it is referring to the toolbox.  Does anyone know why the publishing process is trying to add a custom toolbox to a file geodatabase?  I know that it will do that for data that has a datastore which is not registered, but this is not data.  I have a feeling it is getting mixed up and is not supposed to put that custom toolbox in the file geodatabase and is failing because it can't figure out how to handle it.  Any insight into this would be very much appreciated.  Thanks - Peter