LookupError: unknown encoding: _iso-2022-jp$esc
This happens when I open a page of Held Messages containing an offending message. I get Server Error (500) in Postorius. Here is the mailman.log:
Sep 07 15:25:39 2018 (32) REST request handler error: Traceback (most recent call last): File "/usr/local/lib/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/local/lib/python3.6/site-packages/mailman/rest/wsgiapp.py", line 214, in __call__ return super().__call__(environ, start_response) File "/usr/local/lib/python3.6/site-packages/falcon/api.py", line 244, in __call__ responder(req, resp, **params) File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 160, in on_get resource = self._make_collection(request) File "/usr/local/lib/python3.6/site-packages/mailman/rest/helpers.py", line 159, in _make_collection for resource in collection] File "/usr/local/lib/python3.6/site-packages/mailman/rest/helpers.py", line 159, in <listcomp> for resource in collection] File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 150, in _resource_as_dict resource = self._make_resource(request.id) File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 77, in _make_resource resource['msg'] = msg.as_string() File "/usr/local/lib/python3.6/site-packages/mailman/email/message.py", line 54, in as_string value = email.message.Message.as_string(self) File "/usr/local/lib/python3.6/email/message.py", line 158, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python3.6/email/generator.py", line 116, in flatten self._write(msg) File "/usr/local/lib/python3.6/email/generator.py", line 181, in _write self._dispatch(msg) File "/usr/local/lib/python3.6/email/generator.py", line 214, in _dispatch meth(msg) File "/usr/local/lib/python3.6/email/generator.py", line 243, in _handle_text msg.set_payload(payload, charset) File "/usr/local/lib/python3.6/email/message.py", line 315, in set_payload payload = payload.encode(charset.output_charset) LookupError: unknown encoding: _iso-2022-jp$esc
On 09/07/2018 08:30 AM, Thor Atle Rustad wrote:
This happens when I open a page of Held Messages containing an offending message. I get Server Error (500) in Postorius. Here is the mailman.log:
Sep 07 15:25:39 2018 (32) REST request handler error: Traceback (most recent call last): File "/usr/local/lib/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/local/lib/python3.6/site-packages/mailman/rest/wsgiapp.py", line 214, in __call__ return super().__call__(environ, start_response) File "/usr/local/lib/python3.6/site-packages/falcon/api.py", line 244, in __call__ responder(req, resp, **params) File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 160, in on_get resource = self._make_collection(request) File "/usr/local/lib/python3.6/site-packages/mailman/rest/helpers.py", line 159, in _make_collection for resource in collection] File "/usr/local/lib/python3.6/site-packages/mailman/rest/helpers.py", line 159, in <listcomp> for resource in collection] File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 150, in _resource_as_dict resource = self._make_resource(request.id) File "/usr/local/lib/python3.6/site-packages/mailman/rest/post_moderation.py", line 77, in _make_resource resource['msg'] = msg.as_string() File "/usr/local/lib/python3.6/site-packages/mailman/email/message.py", line 54, in as_string value = email.message.Message.as_string(self) File "/usr/local/lib/python3.6/email/message.py", line 158, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python3.6/email/generator.py", line 116, in flatten self._write(msg) File "/usr/local/lib/python3.6/email/generator.py", line 181, in _write self._dispatch(msg) File "/usr/local/lib/python3.6/email/generator.py", line 214, in _dispatch meth(msg) File "/usr/local/lib/python3.6/email/generator.py", line 243, in _handle_text msg.set_payload(payload, charset) File "/usr/local/lib/python3.6/email/message.py", line 315, in set_payload payload = payload.encode(charset.output_charset) LookupError: unknown encoding: _iso-2022-jp$esc
I think this should be fixed in Mailman core 3.2.0.
It is related to Mailman core issues 256, 437 and 470 and merge requests 197, 322, 350 and 375. In particular, it looks like you are missing at least <https://gitlab.com/mailman/mailman/merge_requests/375>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Thor Atle Rustad