software-properties-gtk crashed with aptsources.distro.NoDistroTemplateException in get_sources(): Error: could not find a distribution template for Ubuntu/bionic

Bug #1312673 reported by Karma Dorje
56
This bug affects 12 people
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu Utopic Unicorn (development branch)
Release: 14.10

apt-cache policy software-properties-gtk
software-properties-gtk:
  Installed: 0.92.37
  Candidate: 0.92.37
  Version table:
 *** 0.92.37 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.92.36 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

ProblemType: Crash
DistroRelease: Ubuntu 14.10
Package: software-properties-gtk 0.92.37
Uname: Linux 3.14.0-999-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Fri Apr 25 19:27:37 2014
ExecutablePath: /usr/bin/software-properties-gtk
InstallationDate: Installed on 2012-09-30 (572 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.1)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/software-properties-gtk --open-tab 2 --toplevel 62914567
PythonArgs: ['/usr/bin/software-properties-gtk', '--open-tab', '2', '--toplevel', '62914567']
SourcePackage: software-properties
Title: software-properties-gtk crashed with aptsources.distro.NoDistroTemplateException in get_sources(): Error: could not find a distribution template for Ubuntu/utopic
UpgradeStatus: Upgraded to utopic on 2013-11-10 (165 days ago)
UserGroups:

Revision history for this message
Karma Dorje (taaroa) wrote :
information type: Private → Public
tags: removed: need-duplicate-check
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
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
dino99 (9d9) wrote :

Get that issue after having changing "trusty" to "utopic" inside /etc/apt/sources.list
In factthat trouble is often met with a new release cycle :

/usr/share/python-apt/templates/Ubuntu.info

is simply not aware of "utopic"; Ubuntu.info needs to be upgraded with the whole "utopic" blocks, after the "devel" blocks and before the "trusty" blocks.

So that also means that "devel" ignore "utopic" right now. As a result, synaptic -> repositories cant be opened to set our preferences. Changing "utopic" by "devel" inside sources.list does not allow synaptic to open the "repositories" to select what we wanting.

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

Fixed by the python-apt 0.9.3.6 upgrade

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

Ubuntu 14.10
----------------
Bug still persists. So why this bug report has been marked as fixed? o_O

Revision history for this message
Karma Dorje (taaroa) wrote :

confirm; resolved fixed

#5 Please update your system: sudo update-manager -d

Mike Davis (mdavi86)
Changed in software-properties (Ubuntu):
assignee: nobody → Mike Davis (mdavi86)
Revision history for this message
Ron Bakker (r0n) wrote :

I'm using Xubuntu 15.04 and the problem is here again ....... (Daily-build 30 jan 2015)

Revision history for this message
Kenneth Wrede (kennethwrede) wrote :

And it's back. Daily Jakkety 16.10, Ubuntu Studio. Updated with latest fixes.

Revision history for this message
corrado venturini (corradoventu) wrote :

Error: could not find a distribution template for Ubuntu/zesty
after changing "yakkety" to "zesty" inside /etc/apt/sources.list
note: from terminal apt-get update and upgrade works fine

Revision history for this message
John Russell (jrussell-88) wrote :

Just upgraded to Yakkety amd64, changed 3rd party sources to Yakkety, updated software and software-properties-gtk returns the error:
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 101, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 101, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/zesty

There is no Zesty in my sources but /etc/lsb-release is:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu Zesty Zapus (development branch)"

So I edited it:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=yakkety
DISTRIB_DESCRIPTION="Ubuntu 16.10"

And Software & Updates is working again.

Revision history for this message
yeib (yeib) wrote :

I just did the same as John Russel, edited /etc/lsb-release to 16.10, and now it works again.

fcole90 (fcole90)
summary: software-properties-gtk crashed with
aptsources.distro.NoDistroTemplateException in get_sources(): Error:
- could not find a distribution template for Ubuntu/utopic
+ could not find a distribution template for Ubuntu/bionic
Revision history for this message
Frogs Hair (detaill) wrote :

aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/bionic

Jeremy Bícha (jbicha)
affects: software-properties (Ubuntu) → python-apt (Ubuntu)
Changed in python-apt (Ubuntu):
assignee: Mike Davis (mdavi86) → nobody
Revision history for this message
corrado venturini (corradoventu) wrote :

software-properties-gtk crashed with aptsources.distro.NoDistroTemplateException in get_sources(): Error: could not find a distribution template for Ubuntu/eoan

Revision history for this message
corrado venturini (corradoventu) wrote :

software-properties-gtk crashed with aptsources.distro.NoDistroTemplateException in get_sources(): Error: could not find a distribution template for Ubuntu/focal

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.