UnicodeEncodeError fix -- str => repr

This is only used in error reporting