does anyone have an idea, why this Python 3.2 code
try: raise Exception(\'X\') except Exception as e: print(\"Error {0}\".format(str(e)))
In Python3, string does not have such attribute as encoding. It's always unicode internally. For encoded strings, there are byte arrays:
string
s = "Error {0}".format(str(e)) # string utf8str = s.encode("utf-8") # byte array, representing utf8-encoded text