AnsweredAssumed Answered

Tool not loading in ArcGIS Pro correctly

Question asked by roemhildtg on Mar 25, 2016
Latest reply on Mar 25, 2016 by roemhildtg

I have created a python toolbox tool for ArcGIS Pro, added parameters, and set it up so that Pro is displaying the tool and not complaining about any syntax errors, but for some reason three oddities are occuring.

  • When I click on the tool to run, no parameters are displayed

  • The label of the tool does not display as I have it set, instead Pro displays the class name. Maybe that's the default?
class PolygonCentroidToPoint(object):
    def __init__(self):
        Define the tool (tool name is the name of the class).
        self.label = "Polygon Centroid To Point"
        self.canRunInBackground = True

  • When I run the tool (without parameters in the python console) there are no .pyc files created, which I assumed usually happens when python runs a script, which tells me that ArcGIS pro isn't actually getting to the file somehow, but also not throwing errors...


Take a look and see if you spot anything, I've probably been staring at this too long and am missing something obvious...


The python console does print errors when the tool runs though, but it doesn't really seem to mean much.

Runtime error 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "J:\Scripts and Tools\Python_Tools\Utilities.pyt", line 64, in PolygonCentroidToPoint
  File "J:\Scripts and Tools\Python_Tools\Utilities.pyt", line 61, in PolygonCentroidToPoint
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\", line 500, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000816: The tool is not valid.
Failed to execute (PolygonCentroidToPoint).


esri-python-tools/ at arcgis_pro · roemhildtg/esri-python-tools · GitHub