UnicodeDecodeError loading config file containing invalid UTF-8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Vincent Ladeuil | ||
bzr (Ubuntu) |
Fix Released
|
Low
|
Jelmer Vernooij |
Bug Description
Binary package hint: bzr
10.10 amd64
bzr 2.2.1-0ubuntu1
I see similar bugs, but I'm not sure if this is exactly the same. This is on a branch which has only been lightly touched, and I haven't knowingly created any files, let alone ones with unusual filenames. I ran bzr commands, such as status, yesterday with no problems, but today, running bzr status:
~~~~~~~
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
return the_callable(*args, **kwargs)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
return self._operation
File "/usr/lib/
self.cleanups, self.func, *args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
tree, relfile_list = tree_files(
File "/usr/lib/
apply_view)
File "/usr/lib/
tree = WorkingTree.
File "/usr/lib/
return control.
File "/usr/lib/
return format.open(self, _found=True)
File "/usr/lib/
wt = self._open(
File "/usr/lib/
branch=
File "/usr/lib/
_found=True, ignore_
File "/usr/lib/
ignore_
File "/usr/lib/
super(
File "/usr/lib/
Branch.
File "/usr/lib/
self.
File "/usr/lib/
url = self.get_
File "/usr/lib/
stacked_url = self._get_
File "/usr/lib/
location = config.
File "/usr/lib/
return self._get_
File "/usr/lib/
value = source(
File "/usr/lib/
value = self._get_
File "/usr/lib/
return self._config.
File "/usr/lib/
return ConfigObj(f, encoding='utf-8')
File "/usr/lib/
return _ConfigObj(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
infile = self._handle_
File "/usr/lib/
return self._decode(
File "/usr/lib/
return infile.
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa6 in position 4097: invalid start byte
You can report this problem to Bazaar's developers by running
apport-bug /var/crash/
if a bug-reporting window does not automatically appear.
ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: bzr 2.2.1-0ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-24-generic x86_64
Architecture: amd64
BzrDebugFlags: set()
BzrVersion: 2.2.1
CommandLine: ['/usr/bin/bzr', 'status']
CrashDb: bzr
Date: Fri Dec 10 13:25:40 2010
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/bzr
FileSystemEncoding: UTF-8
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
InterpreterPath: /usr/bin/python2.6
Locale: en_US.utf8
Platform: Linux-2.
ProcCmdline: /usr/bin/python /usr/bin/bzr status
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, user)
LANG=en_US.utf8
PythonVersion: 2.6.6
SourcePackage: bzr
Title: bzr crashed with UnicodeDecodeError in decode()
UserEncoding: UTF-8
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare sbuild
Related branches
- Jelmer Vernooij (community): Approve
-
Diff: 261 lines (+131/-16)4 files modifiedbzrlib/config.py (+21/-11)
bzrlib/errors.py (+9/-0)
bzrlib/tests/test_config.py (+97/-5)
doc/en/release-notes/bzr-2.4.txt (+4/-0)
tags: | removed: need-duplicate-check |
visibility: | private → public |
Changed in bzr (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Low |
tags: |
added: config removed: amd64 apport-crash maverick ubuntu-une |
Changed in bzr: | |
assignee: | nobody → Vincent Ladeuil (vila) |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.4b5 |
status: | In Progress → Fix Released |
Changed in bzr (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Jelmer Vernooij (jelmer) |
This looks like a worse version of bug 502060 caused by having non UTF-8 bytes in a config file. In these circumstances Bazaar should be fixed to give a clear error including the filename.
The solution if you're running into this problem would be to delete or manually correct the problem file.