Use .encode() instead of str() to support unicode arguments.
str() throws an UnicodeEncodeError for code points that cannot be represented in 7-bit ASCII. This makes it impossible to use any non-ASCII characters in module arguments. Using encode('utf-8') gives the desired result.
Showing
Please
register
or
sign in
to comment