Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#986139: offlineimap3 crashes with encoding error

48 views
Skip to first unread message

Santiago R.R.

unread,
Mar 30, 2021, 6:10:03 AM3/30/21
to
Source: offlineimap3
Version: 0.0~git20210225.1e7ef9e+dfsg-3
Severity: important

Dear Sudip,

My offlineimap3 crashes when trying to retrieve some messages:

...
Last 11 debug messages logged for Copy message from Riseup-Remote:origin-mail-dir prior to exception:
thread: Register new thread 'Copy message from Riseup-Remote:origin-mail-dir' (account 'Riseup')
imap: 15:26.95 Copy message from Riseup-Remote:origin-mail-dir [async] UID ('FETCH', '1981', '(BODY.PEEK[])')
imap: 15:26.95 Copy message from Riseup-Remote:origin-mail-dir state_change_pending.acquire
imap: 15:26.95 Copy message from Riseup-Remote:origin-mail-dir state_change_pending.release
imap: 15:26.95 Copy message from Riseup-Remote:origin-mail-dir _request_push(b'EPBL24', UID, {}) = b'EPBL24'
imap: 15:26.95 Copy message from Riseup-Remote:origin-mail-dir data=b'EPBL24 UID FETCH 1981 (BODY.PEEK[])'
imap: 15:26.96 Copy message from Riseup-Remote:origin-mail-dir UID:b'EPBL24'.ready.wait
imap: 15:27.44 Copy message from Riseup-Remote:origin-mail-dir _get_untagged_response(FETCH) => [(b'184 (UID 1981 BODY[] {6664}', b'Return-Path: <bounce-orig...@lists.ex
imap: 15:27.44 Copy message from Riseup-Remote:origin-mail-dir _untagged_response(OK, ?, FETCH) => [(b'184 (UID 1981 BODY[] {6664}', b'Return-Path: <bounce-orig...@lists.ex
imap: Returned object from fetching 1981: 'Return-Path: <bounce-orig...@lists.example.net>
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on towhee.riseup.net
X-Spam-Level:
X... v2.0
*****************************************
'
maildir: Write mail 'origin-mail-dir:1981' with flags set()
2021-03-30 10:15:27 INFO: OfflineIMAP 7.3.0
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
2021-03-30 10:15:27 WARNING: ERROR: Exceptions occurred during the run!
2021-03-30 10:15:27 WARNING: ERROR: Copying message 1981 [acc: Riseup]
'ascii' codec can't encode characters in position 3523-3525: ordinal not in range(128)
2021-03-30 10:15:27 WARNING:
Traceback:
File "/usr/share/offlineimap3/offlineimap/folder/Base.py", line 807, in copymessageto
new_uid = dstfolder.savemessage(uid, message, flags, rtime)
File "/usr/share/offlineimap3/offlineimap/folder/Maildir.py", line 380, in savemessage
tmpname = self.save_to_tmp_file(messagename, msg)
File "/usr/share/offlineimap3/offlineimap/folder/Maildir.py", line 330, in save_to_tmp_file
fd.write(msg.as_bytes(policy=output_policy))
File "/usr/lib/python3.9/email/message.py", line 178, in as_bytes
g.flatten(self, unixfrom=unixfrom)
File "/usr/lib/python3.9/email/generator.py", line 116, in flatten
self._write(msg)
File "/usr/lib/python3.9/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/usr/lib/python3.9/email/generator.py", line 218, in _dispatch
meth(msg)
File "/usr/lib/python3.9/email/generator.py", line 268, in _handle_multipart
self.write(subparts)
File "/usr/lib/python3.9/email/generator.py", line 410, in write
self._fp.write(s.encode('ascii', 'surrogateescape'))

Tell me if more debug information is needed.

Cheers,

-- S


-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-4-amd64 (SMP w/8 CPU threads)
Locale: LANG=es_CO.UTF-8, LC_CTYPE=es_CO.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information
signature.asc

Nehalenniæ Oudin

unread,
Apr 2, 2021, 6:20:03 AM4/2/21
to
Hi,

I have the same problem.
If I have some time, I'll have a look at it.


--
Nehalenniæ
signature.asc

Sudip Mukherjee

unread,
Apr 2, 2021, 4:30:03 PM4/2/21
to
Control: forwarded -1 https://github.com/OfflineIMAP/offlineimap3/issues/62
--

On Fri, Apr 2, 2021 at 11:18 AM Nehalenniæ Oudin <neha....@crans.org> wrote:
>
> Hi,
>
> I have the same problem.
> If I have some time, I'll have a look at it.

Thanks. You might like to raise a PR in upstream repo also.


--
Regards
Sudip

Sudip Mukherjee

unread,
Apr 8, 2021, 5:20:05 AM4/8/21
to
Hi Santiago, Nehalennić,

On Fri, Apr 02, 2021 at 09:19:25PM +0100, Sudip Mukherjee wrote:
> Control: forwarded -1 https://github.com/OfflineIMAP/offlineimap3/issues/62
> --
>
> On Fri, Apr 2, 2021 at 11:18 AM Nehalennić Oudin <neha....@crans.org> wrote:
> >
> > Hi,
> >
> > I have the same problem.
> > If I have some time, I'll have a look at it.
>
> Thanks. You might like to raise a PR in upstream repo also.

Can any of you help with a sample or sanitized email that causes the issue please.

Ref: https://github.com/OfflineIMAP/offlineimap3/issues/62#issuecomment-814532373


--
Regards
Sudip

Sudip Mukherjee

unread,
Apr 17, 2021, 6:50:02 PM4/17/21
to
Hi Santiago, Nehalennić,

On Thu, Apr 08, 2021 at 10:08:31AM +0100, Sudip Mukherjee wrote:
> Hi Santiago, Nehalennić,
>
> On Fri, Apr 02, 2021 at 09:19:25PM +0100, Sudip Mukherjee wrote:
> > Control: forwarded -1 https://github.com/OfflineIMAP/offlineimap3/issues/62
> > --
> >
> > On Fri, Apr 2, 2021 at 11:18 AM Nehalennić Oudin <neha....@crans.org> wrote:
> > >
> > > Hi,
> > >
> > > I have the same problem.
> > > If I have some time, I'll have a look at it.
> >
> > Thanks. You might like to raise a PR in upstream repo also.
>
> Can any of you help with a sample or sanitized email that causes the issue please.

Will it be possible for you to test the PR at:
https://github.com/OfflineIMAP/offlineimap3/pull/63 and verify if that
fixes the encoding problem that you are seeing.

Thanks in advance.

--
Regards
Sudip
0 new messages