Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Tim MeagherThis error occurs when - within a BRAINscript expression - you are trying to convert a string value to an integer where the string itself does not represent a valid integer.
For instance, the following:
myIntegerValue = int("not really a number")
Will result in the "brain.node.ToInteger_ExprOp.cpp.123" error code, as will:
myIntegerValue = "not really a number".int()
However the following will work without problems:
myIntegerValue = "123".int()
and:
myIntegerValue = int("123")
If the value that you are trying to convert is coming from an input field, and you expect all of the data in that input field to represent integer values, then this likely represents a data quality issue.
In such cases, the "Log Message" field within the log viewer will inform as to the value which it is trying to convert to an integer.
For instance if you are reading from a data field, and trying to convert to an integer, the message:
| could not convert to integer: 'okay' |
Means that the input field contains the value "okay" which cannot be converted to an integer.