Python toolbox doesn not work in ArcMap with italian language setting

1896
10
Jump to solution
02-22-2017 09:05 AM
AlessandroValra
Occasional Contributor III

I have created a Python toolbox which works in my and others' ArcMap 10.4.1. Today I tried it on another ArcMap installation (always 10.4.1), and I get a little-red-cross icon on top of the python script (tool) inside the python toolbox from within the catalog window. I noticed that AcrMap is in Italian in this installation and if I switch to english everything works just fine. Would this be a bug? Does anyone else have occurred in such error? The error is related to the "GetParameterInfo" of the toolbox. However, this same toolbox works on other ArcMap 10.4.1... The error is the one below:

Traceback (most recent call last):
  File "<string>", line 60, in getParameterInfo
  File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\arcobjects\mixins.py", line 299, in __init__
    setattr(self, attrib, attribvalue)
  File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\arcobjects\_base.py", line 89, in _set
    return setattr(self._arc_object, attr_name, cval(val))
ValueError: ParameterObject: Valore input non valido per propriet\xe0 DataType

0 Kudos
10 Replies
AlessandroValra
Occasional Contributor III

I had the time to test with older versions and this still does not work. From the italian ESRI support they give me the right solution now: apparently, the DataType of one of the parameters was set somehow to work only with English version. In my specific case, I had a DataType set to "Table". Changing this to "DETable" made the whole tool work also with italian settings. So, apparently, looking at "Defining parameter data types in a Python toolbox" help page, if I insert the keyword datatype, instead of the Data Type (look at the table in the page to understand) it works, otherwise it doesn't. I wonder if the "Caution" section in the same page is saying just that... It reads "The use of keywords for parameter data types was introduced at 10.1, service pack 1. Parameter descriptions can still be used but are not localized and cannot be used for different locales.". Hope this can be of help for anybody.

0 Kudos