Make sure that charset attribute is a str. Changed: quixote/http_response.py Here is the diff: Index: quixote/http_response.py =================================================================== --- quixote/http_response.py (revision 26250) +++ quixote/http_response.py (working copy) @@ -165,7 +165,7 @@ self.content_type = content_type def set_charset(self, charset): - self.charset = charset.lower() + self.charset = str(charset).lower() def set_status(self, status, reason=None): """set_status(status : int, reason : string = None)