add-apt-repository crashed with NoDistroTemplateException in get_sources(): Error: could not find a distribution template

Bug #978008 reported by Jakob Mayer on 2012-04-10
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Software Properties
software-properties (Ubuntu)

Bug Description

called »sudo add-apt-repository "deb precise main"« via console
before, LinuxMint 12 repository has been added, some packages from it have been installed and the repository has been removed again. Problems occured including wrong plymouth configuration, some programs reported errors regarding wrong system version. /etc/lsb-release and /etc/issue got overwritten with LinuxMint information. Fixed that by re-overwriting Ubuntu 12.04 information.

a further call with a different repository line of "deb stable non-free" also failed.

Ubuntu Version:
Distributor ID: Ubuntu
Description: Ubuntu 12.04
Release: 12.04
Codename: Precise

add-apt-repository verson:
  Installiert: 0.82.7
  Kandidat: 0.82.7
 *** 0.82.7 0
        500 precise/main i386 Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: python-software-properties 0.82.7
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic-pae 3.2.14
Uname: Linux 3.2.0-22-generic-pae i686
ApportVersion: 2.0-0ubuntu5
Architecture: i386
CrashCounter: 1
Date: Tue Apr 10 14:45:39 2012
ExecutablePath: /usr/bin/add-apt-repository
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta i386 (20120403)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/add-apt-repository deb\\ precise\ main
 PATH=(custom, no user)
PythonArgs: ['/usr/bin/add-apt-repository', 'deb precise main']
SourcePackage: software-properties
Title: add-apt-repository crashed with NoDistroTemplateException in get_sources(): Error: could not find a distribution template
UpgradeStatus: No upgrade log present (probably fresh install)

Jakob Mayer (uzuuru) wrote :
description: updated
affects: ubuntu → software-properties (Ubuntu)
tags: removed: need-duplicate-check
Jakob Mayer (uzuuru) on 2012-04-10
visibility: private → public
Jakob Mayer (uzuuru) on 2012-04-12
description: updated
Launchpad Janitor (janitor) wrote :

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

Changed in software-properties (Ubuntu):
status: New → Confirmed
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Robert Roth (evfool) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug #874329, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

raoul martin (raoul223) wrote :

try to install PPA manager :

 sudo add-apt-repository ppa:webupd8team/y-ppa-manager[sudo] password for raoul:
You are about to add the following PPA to your system:
 Y PPA Manager

Info and feedback:

This PPA is for Y PPA Manager and also includes the latest YAD for Quantal, Precise, Oneiric, Natty, Maverick and Lucid (YAD is a dependency for Y PPA Manager):
 More info:
Press [ENTER] to continue or ctrl-c to cancel adding it

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 160, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 96, in __init__
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 584, in reload_sourceslist
  File "/usr/lib/python2.7/dist-packages/aptsources/", line 87, in get_sources
    raise NoDistroTemplateException("Error: could not find a "
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template

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

Other bug subscribers