UnicodeDecodeError on Vivid for non-ascii characters in config files

Bug #1394131 reported by David Callé
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Upgraded to Vivid, my bazaar.conf contains the letter "é".
Most bzr commands now fail with UnicodeDecodeError in bzrlib/rio.py

bzr 2.7.0dev1 on python 2.7.8 (Linux-3.16.0-24-generic-x86_64-with-
    Ubuntu-15.04-vivid)
arguments: ['/usr/bin/bzr', 'init']
plugins: bash_completion[2.7.0dev1], builddeb[2.8.6],
    changelog_merge[2.7.0dev1], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 2116, in run
    force_new_tree=force_new_tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 642, in create_branch_convenience
    controldir = klass.create(base, format, possible_transports)
  File "/usr/lib/python2.7/dist-packages/bzrlib/controldir.py", line 840, in create
    return format.initialize_on_transport(t)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 1321, in initialize_on_transport
    return self._initialize_on_transport_vfs(transport)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 1463, in _initialize_on_transport_vfs
    control_files.lock_write()
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockable_files.py", line 164, in lock_write
    token_from_lock = self._lock.lock_write(token=token)
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 674, in lock_write
    return self.wait_lock()
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 603, in wait_lock
    return self.attempt_lock()
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 552, in attempt_lock
    result = self._attempt_lock()
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 238, in _attempt_lock
    tmpname = self._create_pending_dir()
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 342, in _create_pending_dir
    info.to_bytes())
  File "/usr/lib/python2.7/dist-packages/bzrlib/lockdir.py", line 786, in to_bytes
    s = rio.Stanza(**self.info_dict)
  File "/usr/lib/python2.7/dist-packages/bzrlib/rio.py", line 118, in __init__
    self.add(tag, value)
  File "/usr/lib/python2.7/dist-packages/bzrlib/rio.py", line 125, in add
    value = unicode(value)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

bzr 2.7.0dev1 on python 2.7.8 (Linux-3.16.0-24-generic-x86_64-with-
    Ubuntu-15.04-vivid)
arguments: ['/usr/bin/bzr', 'init']
plugins: bash_completion[2.7.0dev1], builddeb[2.8.6],
    changelog_merge[2.7.0dev1], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.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/bzr/+filebug
    including this traceback and a description of the problem.

Vincent Ladeuil (vila)
description: updated
Revision history for this message
Vincent Ladeuil (vila) wrote :

> Upgraded to Vivid, my bazaar.conf contains the letter "é".

Any details about which config option value contains that ? 'email' ?

Changed in bzr (Ubuntu):
status: New → Incomplete
Revision history for this message
David Callé (davidc3) wrote :

Yes, email

Changed in bzr (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.