TypeError: object of type 'NoneType' has no len()

Bug #1061101 reported by Jonathan Lange on 2012-10-03
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Medium
Unassigned

Bug Description

On quantal::

$ sudo add-apt-repository ppa:undistract-me-packagers/daily
You are about to add the following PPA to your system:
 Builds of https://launchpad.net/undistract-me
 More info: https://launchpad.net/~undistract-me-packagers/+archive/daily
Press [ENTER] to continue or ctrl-c to cancel adding it

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in run
    self.add_ppa_signing_key(self.ppa_path)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 223, in add_ppa_signing_key
    tmp_keyring, tmp_secret_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 145, in _recv_key
    if not verify_keyid_is_v4(signing_key_fingerprint):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 126, in verify_keyid_is_v4
    return len(signing_key_fingerprint) >= 160/8
TypeError: object of type 'NoneType' has no len()

At this point, the new entry in /etc/apt/sources.list.d/, but the key has not been added.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: python-software-properties 0.92.9
ProcVersionSignature: Ubuntu 3.5.0-15.23-generic 3.5.4
Uname: Linux 3.5.0-15-generic x86_64
ApportVersion: 2.6.1-0ubuntu1
Architecture: amd64
Date: Wed Oct 3 18:26:48 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120301)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: software-properties
UpgradeStatus: Upgraded to quantal on 2012-08-19 (45 days ago)

Related branches

Jonathan Lange (jml) wrote :
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Brian Murray (brian-murray) wrote :

For what it is worth I wasn't able to recreate this using the same package version and command on quantal. I wonder if you tried to add the ppa immediately after creating it in Launchpad and that may have caused an issue.

Looking at it some more I guess something like this would fix it:

if signing_key_fingerprint is None:
    return False

after the try, except for getting the key fingerprint.

On 4 October 2012 17:25, Brian Murray <email address hidden> wrote:
> For what it is worth I wasn't able to recreate this using the same
> package version and command on quantal. I wonder if you tried to add
> the ppa immediately after creating it in Launchpad and that may have
> caused an issue.
>

I did, fsvo "immediately".

Thank you for looking into the bug!

jml

Launchpad Janitor (janitor) wrote :

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

Changed in software-properties (Ubuntu):
status: New → Confirmed
Marius Gedminas (mgedmin) wrote :

Just happened to me. I created the PPA ~20 minutes ago, then uploaded a package, waited for it to build, then waited some for it to be published, then tried to test it and got this error in my teeth.

Is Launchpad generating signing keys asynchronously with some delay? Do you have any idea how long that delay might be? Should I try again in 30 minutes, 1 hour, 1 day?

Marius Gedminas (mgedmin) wrote :

Never mind, the key appeared just now (~25 minutes after I created the PPA).

Robert Roth (evfool) on 2012-11-21
Changed in software-properties (Ubuntu):
assignee: nobody → Robert Roth (evfool)
status: Confirmed → In Progress
Robert Roth (evfool) on 2013-01-23
Changed in software-properties (Ubuntu):
assignee: Robert Roth (evfool) → nobody
status: In Progress → Triaged
Jim Salter (jrssnet) wrote :

This bug is currently biting me. I've had the PPA created for about 24 hours, and my key has been published to my Launchpad account for ~2 hours.

Michael Galyuk (galyuk) wrote :

I also caught the bug when try:
apt-add-repository ppa:pandora-net/ppa

You are about to add the following PPA to your system:
 P2P social network Pandora
 More info: https://launchpad.net/~pandora-net/+archive/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 99, in run
    self.add_ppa_signing_key(self.ppa_path)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 127, in add_ppa_signing_key
    if len(signing_key_fingerprint) < 160/8:
TypeError: object of type 'NoneType' has no len()

What's wrong?

Michael Galyuk (galyuk) wrote :

Oops, sorry, I get a problem. The packet is still not builded:
"Latest updates
pandora-net 17 minutes ago
Waiting to build"

It seems trouble is in this.

Dan Lipsitt (danlipsitt) wrote :

This looks similar to #968756 , which is fixed, but not in Precise as of python-software-properties version 0.82.7.5

Chapin Bryce (cbryce) wrote :

Has anyone found a fix for Precise? Just encountered the issue

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers