All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	tools@linux.kernel.org, users@linux.kernel.org
Subject: Re: utf-8 issues on b4 master
Date: Sat, 17 Jul 2021 21:39:17 -0400	[thread overview]
Message-ID: <20210717212631-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <8735sc63hh.fsf@kyleam.com>

On Sat, Jul 17, 2021 at 05:21:30PM -0400, Kyle Meyer wrote:
> Michael S. Tsirkin writes:
> 
> > Passing message id
> > bbe52a89-c7ea-c155-6226-0397f223cd80@linux.alibaba.com to b4
> > gives this backtrace:
> >
> > Traceback (most recent call last):
> >   File "/scm/b4/b4/command.py", line 263, in <module>
> >     cmd()
> >   File "/scm/b4/b4/command.py", line 246, in cmd
> >     cmdargs.func(cmdargs)
> >   File "/scm/b4/b4/command.py", line 41, in cmd_mbox
> >     b4.mbox.main(cmdargs)
> >   File "/scm/b4/b4/mbox.py", line 581, in main
> >     msgid, msgs = get_msgs(cmdargs)
> >   File "/scm/b4/b4/mbox.py", line 523, in get_msgs
> >     msgid = b4.get_msgid(cmdargs)
> >   File "/scm/b4/b4/__init__.py", line 2080, in get_msgid
> >     msgid = get_msgid_from_stdin()
> >   File "/scm/b4/b4/__init__.py", line 2072, in get_msgid_from_stdin
> >     message = email.message_from_string(sys.stdin.read())
> >   File "/usr/lib64/python3.9/codecs.py", line 322, in decode
> >     (result, consumed) = self._buffer_decode(data, self.errors, final)
> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 5886: invalid continuation byte
> >
> > mutt does not seem to have trouble decoding this ... weird.
> 
> I'm confused by that backtrace.  I think get_msgid_from_stdin() should
> be called only when a message is fed on stdin.  You say you're passing a
> message ID.  That's as a positional argument, right?

Sorry. I passed the message on the stdin. I supplied the
message ID so you can get the original from the list archives.

To reproduce:

wget -O - https://lore.kernel.org/lkml/bbe52a89-c7ea-c155-6226-0397f223cd80@linux.alibaba.com/raw | b4 mbox





> Fwiw I wasn't able to trigger the issue on my end.
> 
>   $ b4 am bbe52a89-c7ea-c155-6226-0397f223cd80@linux.alibaba.com
>   Looking up https://lore.kernel.org/r/bbe52a89-c7ea-c155-6226-0397f223cd80%40linux.alibaba.com
>   Analyzing 5 messages in the thread
>   ---
>     [PATCH] virtio-balloon: Use virtio_find_vqs() helper
>       + Reviewed-by: David Hildenbrand <david@redhat.com>
>   ---
>   Total patches: 1
>   ---
>    Link: https://lore.kernel.org/r/1626190724-7942-1-git-send-email-xianting_tian@126.com
>    Base: not specified
>          git am ./20210713_xianting_tian_virtio_balloon_use_virtio_find_vqs_helper.mbx
>   
>   $ b4 mbox bbe52a89-c7ea-c155-6226-0397f223cd80@linux.alibaba.com
>   Looking up https://lore.kernel.org/r/bbe52a89-c7ea-c155-6226-0397f223cd80%40linux.alibaba.com
>   5 messages in the thread
>   Saved ./bbe52a89-c7ea-c155-6226-0397f223cd80@linux.alibaba.com.mbx
> 
> That's with
> 
>   Python 3.7.3
>   b4 v0.7.0-32-g45ef591
>   patatt v0.4.6


b4 v0.7.0-32-g45ef591

python3-3.9.5-2.fc33.x86_64

I don't know about patatt.

-- 
MST


  reply	other threads:[~2021-07-18  1:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 20:50 utf-8 issues on b4 master Michael S. Tsirkin
2021-07-17 21:21 ` Kyle Meyer
2021-07-18  1:39   ` Michael S. Tsirkin [this message]
2021-07-18  4:34     ` [PATCH b4 0/2] Avoid decoding errors when extracting message ID from stdin Kyle Meyer
2021-07-18  4:34       ` [PATCH b4 1/2] " Kyle Meyer
2021-07-18  4:34       ` [PATCH b4 2/2] Parse just headers when extracting message ID from stdin mbox Kyle Meyer
2021-07-18  4:45         ` Kyle Meyer
2021-08-03 16:03       ` [PATCH b4 0/2] Avoid decoding errors when extracting message ID from stdin Konstantin Ryabitsev

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210717212631-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=kyle@kyleam.com \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.