laptop and a wrench

Bug

Using the != Python operator with a conditional in an ArcGIS Pro Network Dataset field script expression returns "Error 160410."

ArcGIS Pro
Bug ID Number BUG-000156764
SubmittedMarch 20, 2023
Last ModifiedJune 5, 2024
Applies toArcGIS Pro
Version found3.1
Operating SystemWindows OS
Operating System Version10.0 64 Bit
Version Fixed3.2, 3.1.2
StatusFixed

Additional Information

This issue is addressed in ArcGIS Pro 3.2 and 3.1.2. Using the != operator in a field script evaluator's code block produces a syntax error when the network is built. This issue has been non-reproducible since ArcMap. However, changes in ArcGIS Pro 3.1 make it more visible. Previously, the build error text file would have included a long list of non-specific errors for each affected feature. Now, the Build Network tool fails with an error and shows the syntax error explicitly.

Workaround

Instead of using the != operator, use 'in []'. For instance, instead of x != 0, use x not in [0].

Steps to Reproduce

Bug ID: BUG-000156764

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