public inbox for [email protected]  
help / color / mirror / Atom feed
From: Magnus Hagander <[email protected]>
To: Célestin Matte <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] pgarchives: parser: handle messages in which Message-ID is missing
Date: Thu, 4 Nov 2021 11:35:41 +0100
Message-ID: <CABUevEw+NK=Rj2nc3_r7qqpshqoBheFMQv-J3Acid_S063PGOg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Wed, Nov 3, 2021 at 6:05 PM Célestin Matte <[email protected]>
wrote:

> By the way, loader/load_message.py has a double crash issue, when
> importing a message raising an IgnorableException:
>
> [...]
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/srv/pgarchives/local//loader/load_message.py", line 155, in
> <module>
>     log_failed_message(listid, "mbox", opt.mbox, ap, e)
>   File "/srv/pgarchives/local//loader/load_message.py", line 36, in
> log_failed_message
>     'err': str(str(err), 'us-ascii', 'replace'),
> TypeError: decoding str is not supported
>
> I don't understand what this line is supposed to do (removing non-ascii
> characters?), but a simple str(err) fixes the issue.
>

It's supposed to remove non-ascii characters.

I think this is a leftover from the py2->py3 conversion. It looks like an
overenthusiastic regexp replacement in the 2to3 tool. See bb5775ef where it
came from. I'll go change it to jut str(err).

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/;
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/;


view thread (15+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] pgarchives: parser: handle messages in which Message-ID is missing
  In-Reply-To: <CABUevEw+NK=Rj2nc3_r7qqpshqoBheFMQv-J3Acid_S063PGOg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox