software-properties-gtk fails: could not find a distribution template for PureOS/green
Closed, DuplicatePublic

Description

I ran the applications hours ago without problem but now it does not work.

I ran it on terminal and show this:

ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
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 109, 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 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for PureOS/green
EchedeyLR edited the task description. (Show Details)
EchedeyLR added a project: Restricted Project.
RITS added a subscriber: RITS.Jan 8 2019, 3:06 PM
jeremiah.foster triaged this task as "Freedom Issue" priority.Jan 14 2019, 7:28 PM
jeremiah.foster added a subscriber: jeremiah.foster.

A couple other issues with this particular piece of software;

  • It is listed as being 'proprietary' software
  • It won't run when one clicks on "launch" (see screenshot)

Sorry, I don't follow: which applications are we talking about here?

If understand from the subject that the error message mentions "UbuntuDrivers" but is that the applications that you attempted to run, or something else, @EchedeyLR ?

In any case, I don't recognize "UbuntuDrivers" as something provided as part of PureOS - was something PureOS mixed with something else?

...or @jeremiah.foster maybe you can clue me in here: What is "this particular piece of software" that you are talking about? Perhaps I am missing something obvoius here, but I am totally clueless right now :-/

It is confusing for sure. :-)

When you click on Activities -> Show Applications in GNOME, you ought to see an application tile with an icon of a box and a globe. This application is called "software properties". Clicking on it brings you to the screen that I attached that shows it can be launched via the blue button and that it has a proprietary license in the red button to the right. However, clicking the blue button doesn't launch the software, the source code shows that the license is GPLv2, and when you try and run the application from the command line (/usr/bin/software-properties-gtk) it fails with the python stack trace that was added by the original poster. There are numerous confusing things here; why does the software have two names (software-properties and software-properties-gtk), why does it put out info on Ubuntu drivers in the stack trace? Why is it in PureOS at all? Apparently it can be used for configuring apt repos but I don't know that we need to have that in PureOS by default?

Apparently it can be used for configuring apt repos but I don't know that we need to have that in PureOS by default?

It makes the distro more user-friendly by default.

If understand from the subject that the error message mentions "UbuntuDrivers" but is that the applications that you attempted to run, or something else, @EchedeyLR ?

Sorry, I put it on task's name but not into description.

Sorry, I put it on task's name but not into description.

I have no problem with your writing details only in subject field.

What I have trouble with is understanding which issue it is you are reporting here.

I understand that you are sharing that you experience an error with this error message:

ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'

What I don't understand is what you did that triggered that error.

If for a moment we assume that @jeremiah.foster understands you, then did you simply "click on Activities -> Show Applications in GNOME" as he describes, or did you additionally browse around in there and select something?

Also, it is quite relevant for hunting down issues like this to know: Do you experience this issue on a pristine PureOS system or a system customized to include software from additional sources?

I tried open "Software & Updates" application from launchpad but It did not work. Then, I thought it was possible it returns some information trying run it from terminal and I did it and put the output into the description.

@jeremiah.foster: Do you experience same issue, or do you talk about GNOME Applications because the stacktrace in the error message hints about it being tied to software-properties-gtk?

That pc is using a default installation.

@EchedeyLR What is the output of this command:

apt list software-properties-gtk
software-properties-gtk/green,green,now 0.96.20.2-1 all [instalado]

I experience the same issue.

I get a similar error when starting software-properties-gtk in the terminal.

Before that I used to be able to open the software repositories gui window by clicking on gnome software and then the green icon on the top left corner of the window. There is a drop down menu and it says Software Repositories. If you try to click on that now nothing shows up anymore. I tracked down the issue to software-properties-gtk after looking into gnome logs.

apt list software-properties-gtk gives me:

software-properties-gtk/green,now 0.96.20.2-1 all [installed,automatic]

(me awaits responses from both @jeremiah.foster and @EchedeyLR for clarification, but suspects this issue is totally unrelated to that "UbuntuDrivers" message and instead the issue relates to AppStream...)

ah - sorry, @EchedeyLR: Seems my window didn't refresh properly so I missed your latest response above. Thanks!

jeremiah.foster added a comment.EditedJan 14 2019, 9:46 PM

On my machine;

$ apt list software-properties-gtk
software-properties-gtk/green,stable,now 0.96.20.2-1 all [installed,automatic]

So software-properties-gtk is automatically installed from green, at least that is how I interpret it.

<snip>

ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'

What I don't understand is what you did that triggered that error.

I triggered the error by running

$ /usr/bin/software-properties-gtk

@jeremiah.foster does it spew anything _after_ that error message about UbuntuDrivers?

@jeremiah.foster does it spew anything _after_ that error message about UbuntuDrivers?

Yes. It spews the rest of the stack trace in the description.

Thanks.

I suspect that the line with UbuntuDrivers is totally unrelated and just a warning (despite the confusingly misleading initial word in captial letters).

jonas.smedegaard changed the title from "software-properties-gtk import module 'UbuntuDrivers' error" to "software-properties-gtk fails: could not find a distribution template for PureOS/green".Jan 14 2019, 10:50 PM

@mak Please have a look at this - smells AppStream-related.

Wayne added a subscriber: Wayne.Jan 16 2019, 1:37 PM

FYI, the same messages appear in the Applications Log when launching "Applications->System Tools->Software & Updates" from the GUI. The stack is just inverted:

08:27:21 gnome-shell: aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for PureOS/green
08:27:21 gnome-shell: aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for PureOS/green
08:27:21 gnome-shell: (self.id, self.codename))
08:27:21 gnome-shell: File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
08:27:21 gnome-shell: self.distro.get_sources(self.sourceslist)
08:27:21 gnome-shell: File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
08:27:21 gnome-shell: self.reload_sourceslist()
08:27:21 gnome-shell: File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in init
08:27:21 gnome-shell: SoftwareProperties.init(self, options=options, datadir=datadir)
08:27:21 gnome-shell: File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 109, in init
08:27:21 gnome-shell: app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
08:27:21 gnome-shell: File "/usr/bin/software-properties-gtk", line 101, in <module>
08:27:21 gnome-shell: Traceback (most recent call last):
08:27:21 gnome-shell: ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'

It appears to be trying to a way to get to green.

Add Comment