Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mia6A-0005OG-VV for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:35:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mia68-000553-UQ for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:35:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mia68-00054u-OC for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:35:56 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mia65-0003ee-Rn for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:35:56 +0000 Received: by mail-lf1-x12e.google.com with SMTP id br12so9166658lfb.8 for ; Thu, 04 Nov 2021 03:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xcG8M17zfb6f785GBB0yRpYwHhzf5QV+ChkFgy5QHH8=; b=jste1uhWpV6h1SCOAEBsH9eZYw+3XYIJT/E0Rbf0FTw+WrNTcY6nZxsENMHj47ry6d ezEgBDCfZ6YUhrjoqncxBNmmoeRfU3zJlSBuF/ocN0oqv6CcRKlvJv+rudpNncce07vK Vz9CooXrBvQGCyGooYK3QJL70kRa2GDS/8tQBs2jD5fHR17NBRtE2/uf/fH2OcrrpfvU JgDmvvkw0g1666yNLBjvci+xa1InZLnPH1S1ahYVYu03vrBB7CgCwKEi3GBHKzcSfO9u 8i43VRqWhvYkUwfDPELnD6sjD29gHQ0i11cc/k8luCBLnVSmGRd9tY2EmYemVTKKAt5M 0RJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xcG8M17zfb6f785GBB0yRpYwHhzf5QV+ChkFgy5QHH8=; b=eUfOkO5iO4jSLUrai7DXB87Tg3T0nQ5J5kH5ylAuoAHBRIXENsF4lXAsoEKAUUX8fs MxOBUdz3pQJ0N3KBAfOzkUxwiiAtOnBqDtgj0plAQbjxG1c8Kgl8AE52Zakxhw/rKLFi 1W57GDmsANX2N4q/WfSUIzZhW9zAKNETMTMOk+H19Ih14U5GfffK1z0kPE8vaj4LmkuZ Qigdf4RxTQKO5KyDinRTiG1rPxdFSM6a0Nn0b2SVENTdD1HJMSDT8i0W88IWl2VNVKC8 VPSKdHUzsIQRqaWcN0b+V6IeNxRTQcmZwkIpI0lCKXYXsPeiEW/GcU7W5qIjd5bFXwTm SQHw== X-Gm-Message-State: AOAM533OD6yHfdoO3q5zeOjAZBTQDlHLdcQIU9NMggo1GPpmOb7Q/mOq 0iahRFHFaz9gPZk64/6qVKcp7lBD7r6Hfw1BG/gJ+w== X-Google-Smtp-Source: ABdhPJxh6dBd+7cyWh3KhxMlW68EoJvsiNPuCD6s3xSIqB1GcvumbI4NZXNsbPoJsV4mE8vGAlQNCpQd5MmjltOwrjw= X-Received: by 2002:a19:ef13:: with SMTP id n19mr28399105lfh.496.1636022152862; Thu, 04 Nov 2021 03:35:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Magnus Hagander Date: Thu, 4 Nov 2021 11:35:41 +0100 Message-ID: Subject: Re: [PATCH] pgarchives: parser: handle messages in which Message-ID is missing To: =?UTF-8?Q?C=C3=A9lestin_Matte?= Cc: pgsql-www@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000044383505cff41725" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000044383505cff41725 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 3, 2021 at 6:05 PM C=C3=A9lestin Matte 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 > > 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). --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --00000000000044383505cff41725 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Nov 3, 2021 at 6:05 PM C=C3= =A9lestin Matte <celestin.ma= tte@cmatte.me> wrote:
By the way, loader/load_message.py has a double crash issue, w= hen importing a message raising an IgnorableException:

[...]
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
=C2=A0 File "/srv/pgarchives/local//loader/load_message.py", line= 155, in <module>
=C2=A0 =C2=A0 log_failed_message(listid, "mbox", opt.mbox, ap, e)=
=C2=A0 File "/srv/pgarchives/local//loader/load_message.py", line= 36, in log_failed_message
=C2=A0 =C2=A0 '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=C2=A0replacement in the 2to3 tool.= See=C2=A0bb5775ef where it came from. I'll go change it to jut str(err= ).

--
=C2=A0Magnus Hagander
=C2=A0Me: https://www.hagander.net/
= =C2=A0Work: ht= tps://www.redpill-linpro.com/
--00000000000044383505cff41725--