This expression contained a character which is not allowed

This error message is given when the relevance interpreter finds a character that it does not recognize. For instance:

Q: {pathname of regapp "besclient.exe"}
E: This expression contained a character which is not allowed.

Curly braces are valid tokens in the action language, but not in relevance. For use in the debugger, you need to drop the braces:

Q: pathname of regapp "besclient.exe"
A: C:\Program Files (x86)\BigFix Enterprise\BES Client\BESClient.exe

Similarly:

Q: #
E: This expression contained a character which is not allowed.

Here, a character that has no meaning in the language was used outside of string constants.