When I wanted to put a huge cube of sand on string, I used /fill to try to put string there, but when I typed the coordinates then put string and did enter, it did the 'unexpected' error.
Steps to reproduce
Do /fill ~~~ ~~~ string
Press enter
What I observed
It gave the 'unexpected' error
What I expected
It would fill string wherever you are
Note
T**his is only for /fill not for /setblock because you can do string on /setblock but not for fill
Try "tripwire" instead of string.