software-properties-gtk crashed with NoDistroTemplateException in get_sources(): Error: could not find a distribution template when Ubuntu.info is out of date

Bug #874329 reported by dino99
98
This bug affects 31 people
Affects Status Importance Assigned to Milestone
software-properties (Debian)
Invalid
Undecided
Unassigned
software-properties (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

first "precise" i386 crash after having installed the available packages. Then this crash happen when i want to open Settings->Repo into synaptic: the dialog box dont open but get this crash.

TEST CASE:
1. Run the latest development release
2. Edit the file /usr/share/python-apt/templates/Ubuntu.info and delete all the sections with and entry "ParentSuite=Precise"
3. Open a terminal and run the following command
  $ software-properties-gtk

EXPECTED RESULT
The application starts correctly.
Ideally it should display a message indicating that the repository information for the current release is out of date.

CURRENT RESULT
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 104, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 85, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 580, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python2.7/dist-packages/aptsources/distro.py", line 91, in get_sources
    raise NoDistroTemplateException("Error: could not find a "
NoDistroTemplateException: Error: could not find a distribution template

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: software-properties-gtk 0.81.10
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
Uname: Linux 3.0.0-12-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Fri Oct 14 17:16:51 2011
ExecutablePath: /usr/bin/software-properties-gtk
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-properties-gtk -n -t 54525989
ProcEnviron:
 SHELL=/bin/bash
 LANG=fr_FR.UTF-8
 PATH=(custom, no user)
PythonArgs: ['/usr/bin/software-properties-gtk', '-n', '-t', '54525989']
SourcePackage: software-properties
Title: software-properties-gtk crashed with NoDistroTemplateException in get_sources(): Error: could not find a distribution template
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: admin audio avahi avahi-autoipd crontab debian-tor fuse haldaemon klog libuuid lpadmin messagebus mythtv plugdev polkituser pulse root ssh ssl-cert syslog users voice

Revision history for this message
dino99 (9d9) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #447208, so 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. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
Revision history for this message
dino99 (9d9) wrote : Re: software-properties-gtk crashed with NoDistroTemplateException in get_sources(): Error: could not find a distribution template

Thats #447208 is so old !!!

Revision history for this message
dino99 (9d9) wrote :

Have found a workaround reading a forum:

commenting out precise-proposed & precise-security entries in sources.list , stop the crash & let opening Settings -> Repo

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
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Changed in software-properties (Debian):
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Setting to low as it only happens very early in the release when Ubuntu.info doesn't contains an entry for the latest dev release.

Changed in software-properties (Ubuntu):
importance: Medium → Low
status: Confirmed → Triaged
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Note that Debian is also affected when /usr/share/python-apt/templates/Debian.info is out of date.

description: updated
summary: software-properties-gtk crashed with NoDistroTemplateException in
- get_sources(): Error: could not find a distribution template
+ get_sources(): Error: could not find a distribution template when
+ Ubuntu.info is out of date
Changed in software-properties (Debian):
importance: Undecided → Unknown
status: Invalid → Unknown
Changed in software-properties (Debian):
status: Unknown → Fix Released
Revision history for this message
Oren Bar (orenbaracha) wrote :

I had this problem, but the root cause was my 12.04 reporting itself as 12.10.
Although this report seem to indicate 12.04, I add this for reference.
Link to explanation and solution (to my problem):
http://askubuntu.com/a/135472/76950

Changed in software-properties (Debian):
importance: Unknown → Undecided
status: Fix Released → New
status: New → Invalid
Michael Vogt (mvo)
Changed in software-properties (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote :

I removed the debian bug watch as this was purported not to affect Debian.

Revision history for this message
Michael Vogt (mvo) wrote :

This should be fixed with the latest python-apt upload that includes "saucy"

Changed in software-properties (Ubuntu):
status: In Progress → 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.