def getParameterInfo(self) -> list:
"""Define the tool parameters."""
project_id = \
arcpy.Parameter(
name="project ID",
displayName="project ID",
datatype="GPString",
parameterType="Required", # Required|Optional|Derived
direction="Input", # Input|Output
)
project_id.filter.type = "ValueList"
project_id.filter.list = self.project_ids
return [project_id]project_id = parameters[0].value
~~~~~~~~~~^^^
TypeError: 'geoprocessing messages object' object is not subscriptableGetParameterInfo is returning [project_id] so I'm not sure why I can't subscript it . 'Parameters' without an index doesn't work either, so I'm not sure what the value method is expecting. This is pretty typical python tool code. Why is it a messages object to begin with? Is that just how the parameters function spits out the parameters?