Bug#918723: ERROR: TypeError: a bytes-like object is required, not 'str'" on committing

2019-01-15 Thread Martin Steigerwald
Hi Jelmer.

For some reason I do not find your original reply in my mail client right 
now.

Thank you very much for fixing this issue. The fix works.

As about baz...@lists.canonical.com I received a delivery failure 
report, and it was already the second time… also the last mails from the 
list I have here are from December 2018. Has the mailing list address 
changed?

Thanks,
-- 
Martin



Bug#918723: "ERROR: TypeError: a bytes-like object is required, not 'str'" on committing

2019-01-08 Thread Jelmer Vernooij
tags 918723 +confirmed
tags 918723 +upstream
thanks

Hi Martin,

On Tue, Jan 08, 2019 at 07:52:38PM +0100, Martin Steigerwald wrote:
>   File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 883, in 
> autopack
> return self._do_autopack()
>   File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 924, in 
> _do_autopack
> reload_func=self._restart_autopack)
>   File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 943, in 
> _execute_pack_operations
> result = packer.pack()
>   File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 711, in 
> pack
> return self._create_pack_from_packs()
>   File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 
> 914, in _create_pack_from_packs
> new_pack.signature_index)
>   File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 
> 639, in _copy_nodes
> write_index, pb, output_lines=output_lines)
>   File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 
> 663, in _do_copy_nodes
> bits = value[1:].split(' ')
> TypeError: a bytes-like object is required, not 'str'
> 
> brz 3.0a2 on python 3.7.2 (Linux-4.20.0-tp520-x86_64-with-debian-buster-sid)
> arguments: ['/usr/bin/brz', 'commit', '-m', 'Updated.', '.gnupg/pubring.gpg']
> plugins: bash_completion[3.0a2], changelog_merge[3.0a2],
> commitfromnews[unknown], cvs[3.0a2], darcs[unknown], email[unknown],
> fastimport[unknown], grep[3.0a2], launchpad[3.0a2], mtn[3.0a2],
> netrc_credential_store[3.0a2], news_merge[3.0a2], po_merge[3.0a2],
> propose[unknown], repodebug[unknown], stats[3.0a2], upload[3.0a2],
> weave_fmt[3.0a2]
> encoding: 'utf-8', fsenc: 'utf-8', lang: 'de_DE.UTF-8'
> 
> *** Bazaar has encountered an internal error.  This probably indicates a
> bug in Bazaar.  You can help us fix it by filing a bug report at
> https://bugs.launchpad.net/brz/+filebug
> including this traceback and a description of the problem.
Hmm, interesting. It looks like you have encountered an untested
corner case while dealing with signatures during autopack when running
on Python 3. It looks like we missed this when porting to Python 3.

I'll make sure this gets fixed before the beta.

> I attempted to write to baz...@lists.canonical.com but got:
> 
> % postqueue -p
> -Queue ID-  --Size-- Arrival Time -Sender/Recipient---
> E086C42C103 5829 Sat Jan  5 15:08:39  mymailaddress
>   (connect to lists-mx.canonical.com[162.213.33.250]:25: Connection timed out)
>  baz...@lists.canonical.com
> 
> -- 5 Kbytes in 1 Request.
Hmm, I'm not sure what that's about. lists.canonical.com is still up,
so I'm guessing that is a transient issue. Can you perhaps try again?

Cheers,

Jelmer


signature.asc
Description: PGP signature


Bug#918723: "ERROR: TypeError: a bytes-like object is required, not 'str'" on committing

2019-01-08 Thread Martin Steigerwald
Package: brz
Version: 3.0.0~bzr7236-1
Severity: important

Dear Maintainer,

On commiting update to a file in my home directory I get:

% brz commit -m "Updated." .gnupg/pubring.gpg   
Committing to: /home/martin/

   
modified .gnupg/pubring.gpg
brz: ERROR: TypeError: a bytes-like object is required, not 'str'   

   

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1016, in 
exception_to_return_code
return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1202, in 
run_bzr
ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 759, in 
run_argv_aliases
return self.run(**all_cmd_args)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 784, in run
return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 137, in 
run_simple
self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 166, in 
_do_with_cleanups
result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/builtins.py", line 3695, in run
lossy=lossy)
  File "/usr/lib/python3/dist-packages/breezy/bzr/workingtree_4.py", line 234, 
in commit
**kwargs)
  File "/usr/lib/python3/dist-packages/breezy/mutabletree.py", line 175, in 
commit
*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commit.py", line 307, in commit
lossy=lossy)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 133, in run
self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/cleanup.py", line 166, in 
_do_with_cleanups
result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commit.py", line 451, in _commit
self.rev_id = self.builder.commit(self.message)
  File "/usr/lib/python3/dist-packages/breezy/bzr/vf_repository.py", line 196, 
in commit
self.repository.commit_write_group()
  File "/usr/lib/python3/dist-packages/breezy/repository.py", line 620, in 
commit_write_group
result = self._commit_write_group()
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 1723, in 
_commit_write_group
hint = self._pack_collection._commit_write_group()
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 1625, in 
_commit_write_group
result = self.autopack()
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 883, in 
autopack
return self._do_autopack()
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 924, in 
_do_autopack
reload_func=self._restart_autopack)
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 943, in 
_execute_pack_operations
result = packer.pack()
  File "/usr/lib/python3/dist-packages/breezy/bzr/pack_repo.py", line 711, in 
pack
return self._create_pack_from_packs()
  File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 914, 
in _create_pack_from_packs
new_pack.signature_index)
  File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 639, 
in _copy_nodes
write_index, pb, output_lines=output_lines)
  File "/usr/lib/python3/dist-packages/breezy/bzr/knitpack_repo.py", line 663, 
in _do_copy_nodes
bits = value[1:].split(' ')
TypeError: a bytes-like object is required, not 'str'

brz 3.0a2 on python 3.7.2 (Linux-4.20.0-tp520-x86_64-with-debian-buster-sid)
arguments: ['/usr/bin/brz', 'commit', '-m', 'Updated.', '.gnupg/pubring.gpg']
plugins: bash_completion[3.0a2], changelog_merge[3.0a2],
commitfromnews[unknown], cvs[3.0a2], darcs[unknown], email[unknown],
fastimport[unknown], grep[3.0a2], launchpad[3.0a2], mtn[3.0a2],
netrc_credential_store[3.0a2], news_merge[3.0a2], po_merge[3.0a2],
propose[unknown], repodebug[unknown], stats[3.0a2], upload[3.0a2],
weave_fmt[3.0a2]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'de_DE.UTF-8'

*** Bazaar has encountered an internal error.  This probably indicates a
bug in Bazaar.  You can help us fix it by filing a bug report at
https://bugs.launchpad.net/brz/+filebug
including this traceback and a description of the problem.


I thought about locale issues and tried with

% LANG="en_GB.UTF-8" brz commit -m "Updated." .gnupg/pubring.gpg

as well. Same error.

For some reason this does not happen when committing as root (for
changes in /etc for example).

Config file is just:

% cat ~/.config/breezy/breezy.conf
[DEFAULT]
email = Martin Steigerwald 
create_signatures = always
gpg_signing_key = 7A5B31796D9BA018

I commented out the two last options for creating signatures by preceeding
with '#', but I get same error