laptop and a wrench

Bug

Using in-line variable substitution in Calculate Field Python within ModelBuilder gives a correct but potentially misleading error message which gives the appearance the tool fails but it works as intended.

Last Published: February 17, 2021 ArcGIS Pro
Bug ID Number BUG-000137029
SubmittedJanuary 27, 2021
Last ModifiedApril 23, 2025
Applies toArcGIS Pro
Version found2.7
Operating SystemWindows OS
Operating System Version10.0
StatusWill Not Be Addressed

Additional Information

This is as designed.

Workaround

Ignore the error message but if there is other things wrong with the calculation this is to be overlooked.

Note: %-% is not valid Python, the validator correctly throws an error. Writing proper Python takes care of this. Enclose the variable needed to replace in a string.

Steps to Reproduce

Bug ID: BUG-000137029

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options