Frequently asked question

Why does populating null values using the Python parser in the ArcGIS Pro Calculate Field tool return a warning message?

Last Published: August 8, 2024

Answer

Attempts to populate Null values using the None value with the Python parser in the Calculate Field tool are successful, but return the following warning message:

Warning:
0003571: Certain rows set to NULL due to error while evaluating python expression: Cannot be evaluated to value.

The warning is introduced in ArcGIS Pro version 3.0 onwards. The warning message is intended for populated values that do not match the data type within the field, for example, text data type values populated into a numeric data type field, as described in the following reference documentation, ArcGIS AllSource: 003571: Certain rows set to NULL due to error while evaluating Python expression: Cannot be evaluated to value. However, in this case, populating null values is the intended purpose and the warning message still pops up. Note that the operation still works as intended and the null values are populated as desired. Null values can be populated using the Calculate Field tool with None as the input in the value block, as shown in the image below.

Populating a field using the Calculate Field tool

The warning returned is expected behavior and by design. Null values, orĀ None, in terms of Python scripting language, are recognized as the NoneType data type. So, when calculated into values for an attribute table, the data types clash against the values of the field. The warning pops up to maintain efficiency in back-end processing of the calculation. Bypassing the check for intentional null values requires another layer of verification to isolate the NoneType data type. Alternatively, the Arcade parser populates null values without the warning when Null is used as input. The sample image below shows the expression.

Populating a field with null values using the Arcade parser

Article ID:000033230

Software:
  • ArcGIS Pro 3 2
  • ArcGIS Pro 3 3
  • ArcGIS Pro 3 0
  • ArcGIS Pro 3 1

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options