[Bug 876511] Re: bzr crashed with UnicodeDecodeError in as_text_lines(): 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

Martin Packman martin.packman at canonical.com
Tue Nov 22 11:44:15 UTC 2011


Can you reproduce this bug? I'm having no luck here, and it's not clear
which part of the testament is at fault. If you could run the same
commit with BZR_PDB=1 set then do `p r` in the debugger and paste the
repr of that list of lines, it would help a lot.

** Summary changed:

- bzr crashed with UnicodeDecodeError in as_text_lines(): 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
+ UnicodeDecodeError from non-ascii bytestring when creating testament

** Description changed:

  Hi,
  
  Trying to commit after an UDD merge from Debian, I got this crash;
  apparently some of the contents is non-ASCII and this confuses bzr.
  
  Cheers,
+ 
+ Traceback (most recent call last):
+   ...
+   File ".../bzrlib/commit.py", line 440, in _commit
+     self.rev_id = self.builder.commit(self.message)
+   File ".../bzrlib/vf_repository.py", line 198, in commit
+     self.new_inventory, self._config)
+   File ".../bzrlib/vf_repository.py", line 1049, in add_revision
+     plaintext = testament.as_short_text()
+   File ".../bzrlib/testament.py", line 196, in as_short_text
+     % (self.revision_id, self.as_sha1()))
+   File ".../bzrlib/testament.py", line 212, in as_sha1
+     return sha_strings(self.as_text_lines())
+   File ".../bzrlib/testament.py", line 154, in as_text_lines
+     return [line.encode('utf-8') for line in r]
+ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
  
  ProblemType: Crash
  DistroRelease: Ubuntu 12.04
  Package: bzr 2.4.1-1ubuntu1
  ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
  Uname: Linux 2.6.38-8-generic x86_64
  ApportVersion: 1.23-0ubuntu3
  Architecture: amd64
  BzrDebugFlags: set()
  BzrVersion: 2.4.1
  CommandLine: ['/usr/bin/bzr', 'commit']
  CrashDb: bzr
  Date: Mon Oct 17 15:19:04 2011
  ExecutablePath: /usr/bin/bzr
  FileSystemEncoding: ANSI_X3.4-1968
  InterpreterPath: /usr/bin/python2.7
  Locale: fr_FR.UTF-8
  PackageArchitecture: all
  Platform: Linux-2.6.38-8-generic-x86_64-with-Ubuntu-12.04-precise
  ProcCmdline: /usr/bin/python /usr/bin/bzr commit
  ProcEnviron:
   LANGUAGE=fr_FR:fr:en_GB:en
   PATH=(custom, user)
   LANG=fr_FR.UTF-8
   SHELL=/bin/zsh
  PythonVersion: 2.7.2
  SourcePackage: bzr
  Title: bzr crashed with UnicodeDecodeError in as_text_lines(): 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
  UpgradeStatus: Upgraded to precise on 2009-12-07 (678 days ago)
  UserEncoding: ANSI_X3.4-1968
  UserGroups: adm admin cdrom dialout kvm libvirtd lpadmin plugdev sambashare sbuild wireshark

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bzr in Ubuntu.
https://bugs.launchpad.net/bugs/876511

Title:
  UnicodeDecodeError from non-ascii bytestring when creating testament

Status in Bazaar Version Control System:
  New
Status in “bzr” package in Ubuntu:
  New

Bug description:
  Hi,

  Trying to commit after an UDD merge from Debian, I got this crash;
  apparently some of the contents is non-ASCII and this confuses bzr.

  Cheers,

  Traceback (most recent call last):
    ...
    File ".../bzrlib/commit.py", line 440, in _commit
      self.rev_id = self.builder.commit(self.message)
    File ".../bzrlib/vf_repository.py", line 198, in commit
      self.new_inventory, self._config)
    File ".../bzrlib/vf_repository.py", line 1049, in add_revision
      plaintext = testament.as_short_text()
    File ".../bzrlib/testament.py", line 196, in as_short_text
      % (self.revision_id, self.as_sha1()))
    File ".../bzrlib/testament.py", line 212, in as_sha1
      return sha_strings(self.as_text_lines())
    File ".../bzrlib/testament.py", line 154, in as_text_lines
      return [line.encode('utf-8') for line in r]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

  ProblemType: Crash
  DistroRelease: Ubuntu 12.04
  Package: bzr 2.4.1-1ubuntu1
  ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
  Uname: Linux 2.6.38-8-generic x86_64
  ApportVersion: 1.23-0ubuntu3
  Architecture: amd64
  BzrDebugFlags: set()
  BzrVersion: 2.4.1
  CommandLine: ['/usr/bin/bzr', 'commit']
  CrashDb: bzr
  Date: Mon Oct 17 15:19:04 2011
  ExecutablePath: /usr/bin/bzr
  FileSystemEncoding: ANSI_X3.4-1968
  InterpreterPath: /usr/bin/python2.7
  Locale: fr_FR.UTF-8
  PackageArchitecture: all
  Platform: Linux-2.6.38-8-generic-x86_64-with-Ubuntu-12.04-precise
  ProcCmdline: /usr/bin/python /usr/bin/bzr commit
  ProcEnviron:
   LANGUAGE=fr_FR:fr:en_GB:en
   PATH=(custom, user)
   LANG=fr_FR.UTF-8
   SHELL=/bin/zsh
  PythonVersion: 2.7.2
  SourcePackage: bzr
  Title: bzr crashed with UnicodeDecodeError in as_text_lines(): 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
  UpgradeStatus: Upgraded to precise on 2009-12-07 (678 days ago)
  UserEncoding: ANSI_X3.4-1968
  UserGroups: adm admin cdrom dialout kvm libvirtd lpadmin plugdev sambashare sbuild wireshark

To manage notifications about this bug go to:
https://bugs.launchpad.net/bzr/+bug/876511/+subscriptions




More information about the foundations-bugs mailing list