initializeParameters Error started at Pro 3.2.1

524
3
01-18-2024 07:57 AM
danbecker
Occasional Contributor III

We have a python script wired to a toolbox that suddently started throwing the below error at 3.2.1. Pro 3.1.3 doesn't have any issues opening this tool in Pro, but 3.2.1 will not even open the tool for users to input parameters. 

Anyone experience this, how to diagnose? 

initializeParameters Error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x91 in position 8: invalid start byte
 
The above exception was the direct cause of the following exception:
 
Traceback (most recent call last):
  File "C:\Users\david\QAP_Toolbox.tbx#CIPAutoQAPRound2.InitializeParameters.py", line 29, in <module>
  File "C:\Users\david\QAP_Toolbox.tbx#CIPAutoQAPRound2.InitializeParameters.py", line 8, in __init__
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 1603, in GetParameterInfo
    return ParameterArray(gp.getParameterInfo(tool_name))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 457, in getParameterInfo
    self._gp.GetParameterInfo(*gp_fixargs(args, True)))
SystemError: <built-in method getparameterinfo of geoprocessing object object at 0x000001D11824C150> returned a result with an error set
3 Replies
Sven_Harpering
Esri Contributor

Hey,

I have observed the same problem. I use the Validation Tool Class very intensively. Everything runs smoothly in ArcGIS Pro 3.1. As of 3.2 I get the same error as you. The error only disappears if I reset the Validation Tool Class to the default, i.e. I don't have my own code in it. Of course it doesn't make sense since I already need my code in there. I don't use a special character either.

I am also interested in a solution :).

Best

Sven

Passionate about GIS and on the journey as an instructor for analytical insights.
0 Kudos
HF_LBD
by
New Contributor II

Hey,

We had the same problem with some of our custom python scripts in ArcGIS Pro 3.2.1. Looks like the parameters name (not the label) must not contain any special characters (we're german, so we used ä,ö,ü,ß before). Worked for us.

Best

Holger

SeanT
by
New Contributor III

Great tip, I found that in one of the tool's input parameters (a boolean in this case, not that it matters) Name had apostrophes and a dash like this: '-999' and once I retyped the '-' around the 999 it fixed the issue!

0 Kudos