Select to view content in your preferred language

Err 539 - 'Invalid Token' on Model

440
1
Jump to solution
05-09-2023 08:27 AM
Wallace
New Contributor II

I'm trying to build a model that generates unique ID's for each feature within a given section of a grid. I'm using the attached Python expression in the Calculate Value tool to generate the ID's within the model and then use Calculate Field to carry them over to the attribute table (new text field). %Grid_Value% is an output from Iterate Feature Selection and it ranges from 001 - 132 (text w/ leading zeros).

 

The model appears to run properly for Grid_Values 001 - 012, but at 013, it errors out on 'Invalid token'. I've tried a couple different methods to verify that everything is outputting as a string, but I'm at a loss as to why '013' is breaking it.

I'm on Pro 2.9.5

What can I do to fix it so that it outputs correctly?

0 Kudos
1 Solution

Accepted Solutions
Wallace
New Contributor II

SOLVED: The Calculate Value tool was correctly outputting a string to Calculate Field, but Calculate Field was not recognizing it as a string. Adding quotation marks fixed that problem so that Calc. Value's Expression == "FunctionName()"

View solution in original post

0 Kudos
1 Reply
Wallace
New Contributor II

SOLVED: The Calculate Value tool was correctly outputting a string to Calculate Field, but Calculate Field was not recognizing it as a string. Adding quotation marks fixed that problem so that Calc. Value's Expression == "FunctionName()"

0 Kudos