Roundup Tracker - Issues

Issue 2551049

classification
Title: Mailer (outgoing) not working with non-ascii content
Type: crash Severity: normal
Components: Mail interface Versions: 2.0.0alpha
process
Status: open Resolution: fixed
Dependencies: Superseder:
Assigned To: schlatterbeck Nosy List: cmeerw, rouilj, schlatterbeck
Priority: Keywords:

Created on 2019-07-02 16:14 by schlatterbeck, last changed 2019-07-06 01:00 by rouilj.

Messages
msg6569 Author: [hidden] (schlatterbeck) Date: 2019-07-02 16:14
The mailer currently uses message.set_payload method without a charset
(charset is an optional argument). This results in a traceback with a
decoding error:

Error: 'ascii' codec can't encode character u'\xe4' in position 15:
ordinal not in range(128)

The fix is to pass the configured charset.

Note that I'm using mailer.standard_message explicitly in a reactor and
I'm not sure if normal nosy emails use the same code path.

I'll push a patch but wanted to document this.
msg6570 Author: [hidden] (schlatterbeck) Date: 2019-07-02 16:17
Fixed in commit bd245858c823
msg6571 Author: [hidden] (rouilj) Date: 2019-07-06 01:00
Ralf:

Sorry to report this but the test is breaking the build under python 3.

See:  https://travis-ci.org/roundup-tracker/roundup/builds/554042243

The crash reports:

            return address
        try:
>           encname = b2s(name.encode('ASCII'))
E           AttributeError: 'bytes' object has no attribute 'encode'
roundup/mailer.py:38: AttributeError

I committed a change that did:

   b2s(name).encode('ASCII')

but that broke even more places, so I reverted it.
History
Date User Action Args
2019-07-06 01:00:07rouiljsetstatus: closed -> open
nosy: + rouilj
messages: + msg6571
2019-07-02 16:17:02schlatterbecksetstatus: new -> closed
resolution: fixed
messages: + msg6570
2019-07-02 16:14:52schlatterbeckcreate