PROBLEM
In ArcGIS Pro, the Calculate Field tool allows concatenating fields, to merge or summarize multiple attributes into one field. In some cases, concatenating fields using a Python expression in the Calculate Field tool fails, and returns one of the following warning messages:
Warning: 002858: Certain rows set to NULL due to error while evaluating python expression: TypeError: unsupported operand type(s) for +: ‘<FieldType>’ and 'NoneType'
Warning: 002858: Certain rows set to NULL due to error while evaluating python expression: TypeError: can only concatenate <FieldType> (not "NoneType") to <FieldType>
The issue occurs when there are Null values in the selected fields.
In ArcGIS Pro, depending on the field data type, replace the Null values with zeros or blank values before using the Calculate Field tool.
If the field values are numeric, replace the field's Null values with zeroes in the attribute table.
If the field values are strings, use the following expression in the Calculate Field tool to replace field's Null values with blank values in the attribute table:
!<FieldName>!.replace("<Null>", "")
In this example, the Python expression is constructed using the Fields and Helpers lists in the Calculate Field tool.
The image below shows the Null values are replaced by blank values in the Field3 field after the Python expression is used in the Calculate Field tool.
Article ID: 000027241
Get help from ArcGIS experts
Download the Esri Support App