TypeError: can't concat str to bytes

Bug #1851478 reported by Benjamin Drung on 2019-11-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
High
Jelmer Vernooij
breezy (Ubuntu)
Undecided
Unassigned

Bug Description

I tried to convert https://code.launchpad.net/~apport-hackers/apport/trunk into git (on Ubuntu 19.10 with brz 3.0.1-6):

$ git init
$ bzr fast-export --plain ../apport.bzr | git fast-import
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/plugins/fastimport/cmds.py", line 507, in run
    return exporter.run()
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 253, in run
    self.emit_commit(revid, self.ref)
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 372, in emit_commit
    self.print_cmd(self._get_commit_command(ref, mark, revobj, file_cmds))
  File "/usr/lib/python3/dist-packages/breezy/plugins/fastimport/exporter.py", line 299, in print_cmd
    self.outf.write(b"%s\n" % cmd)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 189, in __bytes__
    return self.to_string(include_file_contents=True)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 242, in to_string
    for c in self.iter_files()])
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 242, in <listcomp>
    for c in self.iter_files()])
  File "/usr/lib/python3/dist-packages/fastimport/helpers.py", line 120, in repr_bytes
    return bytes(obj)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 367, in __bytes__
    return self.to_string(include_file_contents=True)
  File "/usr/lib/python3/dist-packages/fastimport/commands.py", line 393, in to_string
    datastr = ('\ndata %d\n' % len(self.data)).encode('ascii') + self.data
TypeError: can't concat str to bytes

Related branches

Jelmer Vernooij (jelmer) wrote :

Looks like fastexporting symbolic links is broken on Python 3.

Changed in brz:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.0.2
milestone: 3.0.2 → 3.0.3
Jelmer Vernooij (jelmer) on 2019-12-01
Changed in brz:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers