software-properties-gtk crashed with UnicodeEncodeError in exists(): 'ascii' codec can't encode character u'\xe9' in position 13: ordinal not in range(128)

Bug #839005 reported by segora
118
This bug affects 19 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

install in synaptic ubuntugames ppa, add key public bug :

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

mQGiBEzFMy4RBADBKpxsRAMJDjP/DAgqNuxC20/Xf4DXEtg0emp3NzoDcKBFhUkz
qGGH0dsuUGHC98ZhLWlDQOu3FEYDp1zbg3qUjJ+yeMI1z5CXwf5T0T5qAmIkbq7c
YM/9y8BzuCgn0Oskacl9mRed42uSyvHGcWZVnI6MrQBWlOw0DvmNjYM/JwCg63Ut
Tjsk197brfXX2X9FGxCDgSUD/RPk+aW9xGBoJiwiYjGBo5SAtG5M0Uwp9gse5+my
dML5pUedMKMsAWdO9cNeZSSNwPPs7YClswPwDw2pjd1FJK52lJ2MNeo9OCUec51S
yZkH4r4AN8CrSMswh4w6hDy98tLVTtpWdc14rhhAyvlLikEsh8oUtxE6NaQ0MW7m
FQoqBACt/hP0tScK7DcB8uUjTQU2H543zJ+RfBNOmRTIplZQdmmfklVbniMTKEgR
pL5SpvWWM8wRlQf2lUJJln9mEXjDLJxyPIt0noWbnBTsqz9SMWlplM80p1Kj1xjP
YNtdcK+mNUoHhU3mjppqYssrnGXsGpi8LFtcbsPEwcoMGLzP+7Q1VWJ1bnR1IEdh
bWVzIChSZXBvc2l0b3JpbykgPGNvcmluZ2FvQHVidW50dWdhbWVzLm9yZz6IYAQT
EQIAIAUCTMUzLgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEOK7uUFR53B5
jUEAoIsVPxJ3BenwBtn2wMm02mJRXHvpAKCrB9RS7HXHkWaS0skIM0t4hEZx87kC
DQRMxTMuEAgA3WN0G2Q/49KBCXt3TGOraAyvukaUrAHehq6dAqOJcpXKJmphJcQ1
Mdb2Q/fRZIoxJ6RmDpYPYF93f1NG07Lk0sltSi+GgMcR1ZU/2WN6XuDMunJL4RCi
cgi1w3zobf65eVaaF1TcGJm82rPGgoAp4xqC42ui0ijCYEnBtrB9uAaV73r/zJLj
Bzsr+SPzgZHo0qSvCf/8fqpdpQN/Jif8N8Xl84r5qYHIx+mC4F95V/FZoIBPmhDJ
uw3NRVwl32AaJjem/7Qy0Xm0pJlP2NzxM9zdISGDkK9icEX99zGm/s7XSj/KYVvv
kfSwt8cVROfPnxgrxRSCyi0K3Yei2lnwCwADBQf+LnoGeWepWrCtwHkH5MtzX8G0
vtahqv2qgt5ygynAd1YLiGW1XPvvmso1EeQcEgeSQNXWot9C5zOCEqfJXYTzQUfX
YdRLaX9gHMU3heZl7SHogv2PETJNa4hEpH1skj912KbYr2onu6WQiw9ifavVR5tR
Q25uld79csRAjXP3QSkWXJyDUbMkpC7eDq019Gkgay6fgZ6JjAYxHc3qFdbvezAJ
wdb2bbrddmjWRgmGr+oJwK9r1bNrq0+bLX/NVLA6yVUlQ+eFDLd+FRB8VCa3bi6h
EuFUxr6kZVUSEEvbPhExTJjTMJZb6R59a7LA36S4oaUYgZ08AknvzFDA6IkDmYhJ
BBgRAgAJBQJMxTMuAhsMAAoJEOK7uUFR53B5gp4An1jpefc66pBYkMs3y+kbWsBg
XyZ0AKC+n3BSwhDcgm2aQIjYxRHrL1uDpQ==
=W9Hr
-----END PGP PUBLIC KEY BLOCK-----

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: software-properties-gtk 0.81.9
ProcVersionSignature: Ubuntu 3.0.0-9.15-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Sep 1 20:48:04 2011
ExecutablePath: /usr/bin/software-properties-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64+mac (20110830)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-properties-gtk -n -t 62914689
ProcEnviron:
 SHELL=/bin/bash
 LANG=fr_FR.UTF-8
 PATH=(custom, no user)
PythonArgs: ['/usr/bin/software-properties-gtk', '-n', '-t', '62914689']
SourcePackage: software-properties
Title: software-properties-gtk crashed with UnicodeEncodeError in exists(): 'ascii' codec can't encode character u'\xe9' in position 13: ordinal not in range(128)
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
segora (azzote) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Roth (evfool) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

visibility: private → public
Changed in software-properties (Ubuntu):
importance: Undecided → Low
tags: added: precise
Revision history for this message
der_alex1980 (beckstrinker) wrote :

This bug occurs if the path to the keyfile contains non ascii characters, for example when importing from

/home/alex/Arbeitsfläche/keyfile.ppa.asc

which is the default Desktop directory in German Xubuntu.

Log:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 848, in add_key_clicked
    if not self.backend.AddKey(chooser.get_filename()):
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.UnicodeEncodeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/dbus/SoftwarePropertiesDBus.py", line 280, in AddKey
    return self.add_key(path)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 742, in add_key
    if not os.path.exists(path):
  File "/usr/lib/python2.7/genericpath.py", line 18, in exists
    os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 20: ordinal not in range(128)

Revision history for this message
Thierry Mallard (thierrymallard) wrote :

I suspect this is the same bug for me. I just can't launch software-properties-gtk :

lilo@lilo-Vostro-3360:~$ software-properties-gtk
gpg: /tmp/tmpnd5xe1/trustdb.gpg: base de confiance créée
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 162, in packages_for_modalias
    cache_map = packages_for_modalias.cache_maps[apt_cache_hash]
KeyError: 4252617

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 103, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 178, in __init__
    self.init_drivers()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1097, in init_drivers
    self.devices = detect.system_device_drivers()
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 415, in system_device_drivers
    for pkg, pkginfo in system_driver_packages(apt_cache).items():
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 319, in system_driver_packages
    for p in packages_for_modalias(apt_cache, alias):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 164, in packages_for_modalias
    cache_map = _apt_cache_modalias_map(apt_cache)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 129, in _apt_cache_modalias_map
    m = package.candidate.record['Modaliases']
  File "/usr/lib/python3/dist-packages/apt/package.py", line 429, in record
    return Record(self._records.record)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 114: invalid continuation byte

Revision history for this message
Sébastien Ballangé (sballange) wrote :
Download full text (3.2 KiB)

I have the exact same error as Thierry, plus Apport tries to send me to https://bugs.launchpad.net/bugs/1030471 which 404s.

$ software-properties-gtk --debug
gpg: /tmp/tmpmn3bli/trustdb.gpg: base de confiance créée
ENABLED COMPS: {'restricted', 'main', 'multiverse', 'universe'}
INTERNET COMPS: {'restricted', 'main', 'multiverse', 'universe'}
MAIN SOURCES
 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu
 BaseURI: http://archive.ubuntu.com/ubuntu

CHILD SOURCES
 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu
 BaseURI: None

 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
 BaseURI: http://security.ubuntu.com/ubuntu/

CDROM SOURCES
SOURCE CODE SOURCES
 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu
 BaseURI: http://archive.ubuntu.com/ubuntu

 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu
 BaseURI: None

 URI: http://us.archive.ubuntu.com/ubuntu
 Comps: ['main', 'restricted', 'universe', 'multiverse']
 Enabled: True
 Valid: True
 MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
 BaseURI: http://security.ubuntu.com/ubuntu/

DISABLED SOURCES
ISV
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 162, in packages_for_modalias
    cache_map = packages_for_modalias.cache_maps[apt_cache_hash]
KeyError: 4830165

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 103, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 178, in __init__
    self.init_drivers()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1097, in init_drivers
    self.devices = detect.system_device_drivers()
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 415, in system_device_drivers
    for pkg, pkginfo in system_driver_packages(apt_cache).items():
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 319, in system_driver_packages
    for p in packages_for_modalias(apt_cache, alias):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 164, in packages_for_modalias
    cache_map = _apt_cache_modalias_map(apt_cache)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 129, in _apt_cache_modalias_map
    m = package.candidate.record['Modaliases']
  File "/usr/lib/python3/dist-packages/apt/package.py", line 429, in record
    return Record(self._records.record)
UnicodeDecodeError...

Read more...

Revision history for this message
Daniel Colquitt (danielcolquitt) wrote :

I have, what appears to be, the same bug as Thierry and Sébastien. Apport also tries to send me to https://bugs.launchpad.net/bugs/1030471.

Attached is the output of software-properties-gtk --debug.

Revision history for this message
jlg (vbn2) wrote :

Hi,
the same on Ubuntu12.10-64bits :

"duplicate of https://bugs.launchpad.net/bugs/1030471 "

and the end of the --debug.txt :

DISABLED SOURCES
ISV
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 162, in packages_for_modalias
    cache_map = packages_for_modalias.cache_maps[apt_cache_hash]
KeyError: 4040753

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 103, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 178, in __init__
    self.init_drivers()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1097, in init_drivers
    self.devices = detect.system_device_drivers()
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 415, in system_device_drivers
    for pkg, pkginfo in system_driver_packages(apt_cache).items():
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 319, in system_driver_packages
    for p in packages_for_modalias(apt_cache, alias):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 164, in packages_for_modalias
    cache_map = _apt_cache_modalias_map(apt_cache)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 129, in _apt_cache_modalias_map
    m = package.candidate.record['Modaliases']
  File "/usr/lib/python3/dist-packages/apt/package.py", line 429, in record
    return Record(self._records.record)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 735: invalid continuation byte

Revision history for this message
Wouter Vandenneucker (woutervddn) wrote :

Priority should be high, Software Sources crashes on my HP 6735b because of this...

Revision history for this message
Brian Murray (brian-murray) wrote :

I am setting this to Fix Released as it has not been reported at the Ubuntu Error Tracker for a release since 12.04.

https://errors.ubuntu.com/bucket/?id=/usr/bin/software-properties-gtk:UnicodeEncodeError:add_key_clicked:__call__:call_blocking:_message_cb:AddKey:add_key:exists

Changed in software-properties (Ubuntu):
status: Confirmed → Fix Released
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.