Linux maintainer tooling and workflows
 help / color / Atom feed
* Exception from b4 ty
@ 2020-10-02 21:12 Mark Brown
  2020-10-03  1:17 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2020-10-02 21:12 UTC (permalink / raw)
  To: tools, konstantin


[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]

Hi,

Attempting to generate thanks with b4 ty -a using current git master I
get a traceback:

Found 41 of your commits since 1.week
Calculating patch hashes, may take a moment...
  Located: [PATCH v3 0/9] Some fixes for spi-s3c64xx
---
Generating 1 thank-you letters
  Writing: /tmp/tmp.CwdU649vJ4/l_stelmach_samsung_com_patch_v3_0_9_some_fixes_for_spi_s3c64xx.thanks
Traceback (most recent call last):
  File "/home/broonie/git/b4/b4/command.py", line 239, in <module>
    cmd()
  File "/home/broonie/git/b4/b4/command.py", line 222, in cmd
    cmdargs.func(cmdargs)
  File "/home/broonie/git/b4/b4/command.py", line 60, in cmd_ty
    b4.ty.main(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 629, in main
    auto_thankanator(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 384, in auto_thankanator
    send_messages(applied, cmdargs.gitdir, cmdargs.outdir, wantbranch, since=cmdargs.since)
  File "/home/broonie/git/b4/b4/ty.py", line 431, in send_messages
    fh.write(msg.as_bytes())
  File "/usr/lib/python3.7/email/message.py", line 178, in as_bytes
    g.flatten(self, unixfrom=unixfrom)
  File "/usr/lib/python3.7/email/generator.py", line 116, in flatten
    self._write(msg)
  File "/usr/lib/python3.7/email/generator.py", line 181, in _write
    self._dispatch(msg)
  File "/usr/lib/python3.7/email/generator.py", line 214, in _dispatch
    meth(msg)
  File "/usr/lib/python3.7/email/generator.py", line 432, in _handle_text
    super(BytesGenerator,self)._handle_text(msg)
  File "/usr/lib/python3.7/email/generator.py", line 249, in _handle_text
    self._write_lines(payload)
  File "/usr/lib/python3.7/email/generator.py", line 155, in _write_lines
    self.write(line)
  File "/usr/lib/python3.7/email/generator.py", line 406, in write
    self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode character '\u0141' in position 35: ordinal not in range(128)

This is with commit ca6d35e7728c17b505e6 (Fix some cherry-picking corner
cases) on

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks,
Mark

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Exception from b4 ty
  2020-10-02 21:12 Exception from b4 ty Mark Brown
@ 2020-10-03  1:17 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2020-10-03  1:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: tools

On Fri, Oct 02, 2020 at 10:12:48PM +0100, Mark Brown wrote:
> Hi,
> 
> Attempting to generate thanks with b4 ty -a using current git master I
> get a traceback:
> 

This is due to the earlier fix to set proper charsets. I need to 
remember not to rely on Python's as_bytes() mechanism -- we get much 
better control when we do as_string() and then do the encoding on our 
own.

The latest master/stable-0.5.y has the fix for this, I hope -- plus for 
the horrible header encoding.

-K

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 21:12 Exception from b4 ty Mark Brown
2020-10-03  1:17 ` Konstantin Ryabitsev

Linux maintainer tooling and workflows

Archives are clonable:
	git clone --mirror https://lore.kernel.org/tools/0 tools/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tools tools/ https://lore.kernel.org/tools \
		tools@linux.kernel.org
	public-inbox-index tools

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.linux.tools


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git