could not find a distribution template for elementary OS/isis

Bug #1291678 reported by Cody Garver
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
elementary OS
Fix Released
High
Sergey "Shnatsel" Davidoff

Bug Description

Taken from daily iso build 20140312 live session:

elementary@elementary:~$ software-properties-gtk
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 98, 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 elementary OS/isis

Cody Garver (codygarver)
Changed in elementaryos:
milestone: none → isis-beta1
importance: Undecided → High
assignee: nobody → elementary OS team (elementary-os)
Changed in elementaryos:
milestone: isis-beta1 → isis+1-beta1
milestone: isis+1-beta1 → isis-beta1
status: New → Confirmed
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Looks like we'll have to port our Luna patch to Isis, both to python-apt and python3-apt. That should fix it.

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

The error above was occurring when using the unpatched package. With the patched package I get another error:

$ software-properties-gtk
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 37, in <module>
    from softwareproperties.gtk.SoftwarePropertiesGtk import SoftwarePropertiesGtk
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 51, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 57, in <module>
    from . import shortcuts
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 23, in <module>
    _DEF_CODENAME = aptsources.distro.get_distro().codename
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 490, in get_distro
    codename = result['Suite']
KeyError: 'Suite'

Revision history for this message
diego (diego7319) wrote :

 _DEF_CODENAME = aptsources.distro.get_distro().codename
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 490, in get_distro
    codename = result['Suite']
KeyError: 'Suite'

i think it should be ['Codename']
thats what i read on chat

Changed in elementaryos:
status: Confirmed → In Progress
assignee: elementary OS team (elementary-os) → Sergey "Shnatsel" Davidoff (shnatsel)
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

The fix should land to PPA in a few hours.

Changed in elementaryos:
status: In Progress → Fix Committed
Changed in elementaryos:
status: Fix Committed → Fix Released
Revision history for this message
randy (rfunderburk39) wrote :

I realize this is an old thread, but currently receiving the same error:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 91, in <module>
    sp = SoftwareProperties(options=options)
  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/n/a

Command line lsb_release -a reports:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

But I have "Elementary OS" installed. I'm not sure how this occurred but need to correct the problem. Because I am unable to add a new repository.
I also do if this is posted in the wrong place. Thank you for any assistance.

Revision history for this message
Jorge Henks (geojenks) wrote :

Same here, I've used gksudo to change /etc/lsb-release to Ubuntu, as well as elementary Freya, neither of the setups work, both throw up

"Error: could not find a distribution template for Ubuntu/n/a"

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.