[Bug 1130957] [NEW] Unicode errors in mailman3

Aurélien Bompard aurelien at bompard.org
Thu Feb 21 00:18:58 CET 2013


Public bug reported:

This is with mailman3. I'm getting the following unicode errors:

Feb 20 23:07:43 2013 (13496) Uncaught runner exception: Expected unicode, found <type 'str'>: 'foobar at example.com'
Feb 20 23:07:43 2013 (13496) Traceback (most recent call last):
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 145, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 228, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/runners/outgoing.py", line 93, in _dispose
    self._func(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/mta/deliver.py", line 93, in deliver
    refused = agent.deliver(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/mta/base.py", line 167, in deliver
    member = mlist.members.get_member(recipient)
  File "/srv/dev/mailman/mailman/src/mailman/database/transaction.py", line 78, in wrapper
    return function(args[0], config.db.store, *args[1:], **kws)
  File "/srv/dev/mailman/mailman/src/mailman/model/roster.py", line 111, in get_member
    Address.email == address,
  File "/srv/dev/mailman/venv/lib/python2.7/site-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/expr.py", line 412, in __eq__
    other = getattr(self, "variable_factory", Variable)(value=other)
  File "/srv/dev/mailman/venv/lib/python2.7/site-packages/storm-0.19-py2.7-linux-x86_64.egg/storm/variables.py", line 396, in parse_set
    % (type(value), value))
TypeError: Expected unicode, found <type 'str'>: 'foobar at example.com'
Feb 20 23:07:43 2013 (13496) SHUNTING: 1361401663.441109+267302c50d71d512974fe5caa7aa0214eab699f6

-----------------

Feb 20 22:20:45 2013 (13337) Uncaught runner exception: decoding Unicode is not supported
Feb 20 22:20:45 2013 (13337) Traceback (most recent call last):
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 145, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 228, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/runners/digest.py", line 344, in _dispose
    rfc1153_digest.add_message(message, count)
  File "/srv/dev/mailman/mailman/src/mailman/runners/digest.py", line 269, in add_message
    payload = unicode(payload, 'us-ascii', 'replace')
TypeError: decoding Unicode is not supported
Feb 20 22:20:45 2013 (13337) SHUNTING: 1361398845.847068+d12dc2ef44dcca60ade2fc94f6f830bd09a6b912
Feb 20 22:20:52 2013 (13337) Uncaught runner exception: decoding Unicode is not supported
Feb 20 22:20:52 2013 (13337) Traceback (most recent call last):
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 145, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/core/runner.py", line 228, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/srv/dev/mailman/mailman/src/mailman/runners/digest.py", line 344, in _dispose
    rfc1153_digest.add_message(message, count)
  File "/srv/dev/mailman/mailman/src/mailman/runners/digest.py", line 269, in add_message
    payload = unicode(payload, 'us-ascii', 'replace')
TypeError: decoding Unicode is not supported
Feb 20 22:20:52 2013 (13337) SHUNTING: 1361398852.901291+bc2f1ab7dad828020238e06815fd2b4adab0fe61


The attached patch fixes both tracebacks.

** Affects: mailman
     Importance: Undecided
         Status: New


** Tags: mailman3

** Patch added: "mailman-unicode.patch"
   https://bugs.launchpad.net/bugs/1130957/+attachment/3539184/+files/mailman-unicode.patch

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1130957

Title:
  Unicode errors in mailman3

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1130957/+subscriptions


More information about the Mailman-coders mailing list