Generally, you will face this Error when you are getting values from a file or Unix commands and using that value in Loop ( either transformer loop or sequencer loop ).
The result of the command includes a newline character which causes this issue. Before using this please remove the newline '\n' character from the value.
You can do it by using 'tr' command, i.e.-
echo $a | tr -d "\n"