add-apt-repository crashed with UnicodeDecodeError in __main__: 'ascii' codec can't decode byte 0xc5 in position 3: ordinal not in range(128)

Bug #1012602 reported by gogo
98
This bug affects 15 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

add-apt-repository crashed with UnicodeDecodeError in __main__: 'ascii' codec can't decode byte 0xc5 in position 3: ordinal not in range(128)

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: python-software-properties 0.83
ProcVersionSignature: Ubuntu 3.4.0-5.11-generic 3.4.0
Uname: Linux 3.4.0-5-generic x86_64
ApportVersion: 2.2.1-0ubuntu2
Architecture: amd64
Date: Wed Jun 13 11:36:34 2012
ExecutablePath: /usr/bin/add-apt-repository
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120606.2)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/add-apt-repository ppa:scopes-packagers/ppa
PythonArgs: ['/usr/bin/add-apt-repository', 'ppa:scopes-packagers/ppa']
SourcePackage: software-properties
Title: add-apt-repository crashed with UnicodeDecodeError in __main__: 'ascii' codec can't decode byte 0xc5 in position 3: ordinal not in range(128)
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/add-apt-repository", line 162, in <module>
     print _(" More info: %s") % ppa_info["web_link"]
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 3: ordinal not in range(128)
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
gogo (trebelnik-stefina) wrote :
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
tags: removed: need-duplicate-check
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Attached is a quick patch to fix the problem.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "add-apt-repository-fix_unicode_decode_error.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Robie Basak (racb) wrote :

Subscribing sponsors.

Revision history for this message
Colin Watson (cjwatson) wrote :

I've confirmed that this was fixed as part of the Python 3 port in 0.84.

Changed in software-properties (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Pooja Saxena (nrjrasaxena) wrote :

Hello experts,
 I followed the following steps [1] and installed the stickynotes on Ubuntu 14.04. However, unfortunately, it always crashes with the error saying 'Sorry, Ubuntu 14.04 has experienced an internal error'.

The details of this error says the following problem:
--------------
'indicator-stinotes.py crashed with UnicodeDecodeError in decode(): 'utf-8' coded can't decode byte 0xae in position 5:invalid start byte'.

I found this useful post indicating this bug for 14.04, I am not sure if I understand how this patch works. Regarding my python, its
-------------
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2

I would appreciate any suggestions/comments on fixing this bug.

Thanks,
pooja

[1]
---------------
sudo add-apt-repository ppa:umang/indicator-stickynotes
sudo apt-get update
sudo apt-get install indicator-stickynotes

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Pooja, that is bug 1462196, and it has nothing to do with software-properties.

Revision history for this message
Pooja Saxena (nrjrasaxena) wrote :

Thanks Matthew for your reply.
I got confuse with the error-type I was receiving, so reported it here. Nobody responded, besides this thread was quite old. So I reported the same as new bug: 1462196

Revision history for this message
Kevin Cole (kjcole) wrote :

I'm running Ubuntu Studio 15.10, and still getting this bug...

$ sudo apt-add-repository ppa:hansjorg/rust
 Compiler, tools, libraries and documentation for the Rust programming language.

Multiple versions can be installed side by side. Switch active version with:

sudo update-alternatives --config rustc

Official website: http://www.rust-lang.org/

Keep your Rust project up to date with the latest rust-nightly: http://www.rust-ci.org/
 More info: https://launchpad.net/~hansjorg/+archive/ubuntu/rust
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpxo7v8zdv/secring.gpg' created
gpg: keyring `/tmp/tmpxo7v8zdv/pubring.gpg' created
gpg: requesting key BD6B6386 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpxo7v8zdv/trustdb.gpg: trustdb created
gpg: key BD6B6386: public key "Launchpad PPA for Hans J�rgen Hoel" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 385, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 262, in add_ppa_signing_key
    tmp_export_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 211, in _verify_fingerprint
    got_fingerprints = self._get_fingerprints(keyring, keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 203, in _get_fingerprints
    output = subprocess.check_output(cmd, universal_newlines=True)
  File "/usr/lib/python3.4/subprocess.py", line 609, in check_output
    output, unused_err = process.communicate(inputdata, timeout=timeout)
  File "/usr/lib/python3.4/subprocess.py", line 949, in communicate
    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib/python3.4/subprocess.py", line 491, in _eintr_retry_call
    return func(*args)
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 95: ordinal not in range(128)

$ dpkg -S /usr/bin/apt-add-repository
software-properties-common: /usr/bin/apt-add-repository

$ dpkg -l software-properties-common
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii software-prope 0.96.13.1 all manage the repositories that you

Revision history for this message
James E. King, III (jeking3) wrote :

This happens in ubuntu artful as well:

$ sudo add-apt-repository ppa:nschloe/boost-nightly
...
 More info: https://launchpad.net/~nschloe/+archive/ubuntu/boost-nightly
gpg: keybox '/tmp/tmp0386_qbv/pubring.gpg' created
gpg: /tmp/tmp0386_qbv/trustdb.gpg: trustdb created
gpg: key ECD154D280FEB8AC: public key "Launchpad PPA for Nico Schl�mer" imported
gpg: Total number processed: 1
gpg: imported: 1
'ascii' codec can't decode byte 0xc3 in position 229: ordinal not in range(128)

software-properties-common_0.96.24.16_all.deb

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.