additional drivers tab crashes

Bug #1268134 reported by Lars Nyström
44
This bug affects 9 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Undecided
Josef Andersson

Bug Description

There's a crash every time I open the additional drivers tab in software properties. It says "searching for additional drivers" and then the crash happens. I can reproduce it every time I try to open the additional drivers tab, which means the additional drivers tab doesn't work at all for me.

No drivers are shown in the list, and when running software-properties-gtk from the terminal I can see the following output:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 634, in <lambda>
    return (lambda data: callback(*data), user_data)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1323, in show_drivers
    (overall_status, icon, drivers) = self.gather_device_data(self.devices[device])
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1277, in gather_device_data
    description = base_string.format(base_description=description, licence=licence)
KeyError: 'license'

Ubuntu release:
Description: Ubuntu 13.10
Release: 13.10

software-properties-gtk version 0.92.28

Tags: saucy trusty ui
Revision history for this message
Lars Nyström (xetea) wrote :
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
Josef Andersson (northar) wrote :
Revision history for this message
Joachim Johansson (joachim-j) wrote :

Still present in the latest build of 14.04.

Revision history for this message
Josef Andersson (northar) wrote :

"Still present in the latest build of 14.04."

Yes, can confirm here too.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Uh, it's supposed to be "license" NOT "licence"!!

I edited the .py file and corrected the typo. Now works :)

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

And oh btw there are 6 occurences of this typo, I changed them all..

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Seriously? No fix for this yet? Im baffled a bug like this reaches a final LTS release! I have installed trusty on 4 different machines and this bug affects 3 of them! The common thing ive seen so far is when options to use proprietary graphics drivers are provided, the crash occurs. Pretty serious imho...

Revision history for this message
Lars Nyström (xetea) wrote :

The fix in #6 solves the problem. This should really be released asap.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Yeah, I mean one of the things i absolutely do first after a Ubuntu install is installing the graphics drivers. Now, of course, as i've been on Ubuntu and Linux a few years i do know how to install from the commandline which of course works fine (i tend to do this mostly). But imagine someone going over from say WinXP and is completely new to Ubuntu/Linux they _will_ use the GUI and this becomes a complete blocker, really.

Revision history for this message
Josef Andersson (northar) wrote :

I corrected the faulty translation in launchpad for the software-properties package, Thanks to birdstream for finding it.
Also, the problem should be fixed for all recent versions of Ubuntu.. However I don't know if A) that was all instances needed B) How long it takes for the corrected translation to trickle out in an update. So, a bit more further testing (by us affected) is needed.

Revision history for this message
Josef Andersson (northar) wrote :

Please try if it works for you guys with latest updates, seems to work for me. I did a reboot after updating to be sure that the new lang file was picked up.

Revision history for this message
Josef Andersson (northar) wrote :

Noticed also that the langfile in itself was a bit corrupt and missing the "language" section (that should be sv). So I upped that just now. I tested with the lang sv setting fixed and dont know when that will trickle down. Maybe you should wait until that with testing, dont know if it will work without it. Ill post a new note here when its imported.

Changed in software-properties (Ubuntu):
assignee: nobody → Josef Andersson (northar)
Revision history for this message
Josef Andersson (northar) wrote :

Could someone else verify if this works on a freshly update 14.04 swedish now? Works for me on 2 machines I tried it on.
Do an sudo apt-get update and sudo apt-get upgrade and reboot before trying.

Revision history for this message
Lars Nyström (xetea) wrote :

I'm still experiencing this issue, even after sudo apt-get update && sudo apt-get upgrade and a reboot.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Same here, still crashes...

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

It's seems SoftwarePropertiesGtk.py has reverted back to the earliar version with the misspelled "licence" again...

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Looked into this further and it seems it 0really doesnt matter what that variable is just as long as it's not "licence".
I'm not a programmer (and definately dont know python) but my best guess is that variable is used for some other purpose somewhere in the code already...?

Revision history for this message
Josef Andersson (northar) wrote : Re: [Bug 1268134] Re: additional drivers tab crashes

I downloaded a fresh 14.04, run it an virtual machine with swedish lang.
Works there. Also tested on 2 other machines, 14.04. Works there too for me
now. Haven't tried 13.10 but will do that ltr today. It could be that
the error is only triggered coming from an update from earlier versions
13.x. Try a fresh 14.04 and run with sv lang and see if it works in a vm.
Also, it should be the original licence - not license, its a
keyword/property and should not be translated as it was for a while,
probaly causing the original error. The error in earlier versions were
triggered due to this being inconsistent, translated in one place.
Den 11 maj 2014 16:05 skrev "Joakim Fogelström Hardingz" <
<email address hidden>>:

> Looked into this further and it seems it 0really doesnt matter what that
> variable is just as long as it's not "licence".
> I'm not a programmer (and definately dont know python) but my best guess
> is that variable is used for some other purpose somewhere in the code
> already...?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1268134
>
> Title:
> additional drivers tab crashes
>
> Status in “software-properties” package in Ubuntu:
> Confirmed
>
> Bug description:
> There's a crash every time I open the additional drivers tab in
> software properties. It says "searching for additional drivers" and
> then the crash happens. I can reproduce it every time I try to open
> the additional drivers tab, which means the additional drivers tab
> doesn't work at all for me.
>
> No drivers are shown in the list, and when running software-
> properties-gtk from the terminal I can see the following output:
>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 634,
> in <lambda>
> return (lambda data: callback(*data), user_data)
> File
> "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py",
> line 1323, in show_drivers
> (overall_status, icon, drivers) =
> self.gather_device_data(self.devices[device])
> File
> "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py",
> line 1277, in gather_device_data
> description = base_string.format(base_description=description,
> licence=licence)
> KeyError: 'license'
>
> Ubuntu release:
> Description: Ubuntu 13.10
> Release: 13.10
>
> software-properties-gtk version 0.92.28
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1268134/+subscriptions
>

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

I've gotten this error on fresh installs of 14.04 on 3 out of 4 machines now. The only one that didn't get this error with was on a netbook using open source intel graphics. The other 3 was Nvidia and AMD graphics. So, in my short experience, this error is triggered whenever options to use proprietary graphics drivers are available.

Still, changing "licence" to something else solves my problem and i really can't figure out why...

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Temporarily setting the system language to english also solves the problem. Do the changes, and then revert to swedish..

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Just found out, "licence" isn't really misspelled at all, it's british english. License=verb, licence=noun. In US english they only use the spelling "license" for both the noun and the verb *facepalm* Well, today i learned something new..

I tried a fresh install of 14.04 in a VM and no error there.. Haven't done it earlier though so i cant say if something has changed there.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Josef, as far as i understand now, the language packs gets applied at runtime, right?
Is there any way to apply a .mo file to a python script and have the resulting code output to a new file?

Revision history for this message
Josef Andersson (northar) wrote :

Yes, the problem should be fixed since some time ago, with licence and nothing else:) see comment #19 for details.

"I've gotten this error on fresh installs of 14.04 on 3 out of 4 machines
now. "
Did you try doing this since the translations were fixed, IE sometime after comment #11 were done, or before?

I cant reproduce this error on 14.04 nor 13.10, since the fix. I just tried a fresh 13.10 install, and it also works out of the box there, so the fix done in comment #11 seems to be right.

Anyone STILL having this problem, NOT using a fresh install for 14.04 (maybe coming from an update of 13.x to 14.04) - please try the suggested workaround in comment #21

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Josef, i am still having this issue on my fresh install of 14.04 (no upgrade from 13.10). The current version of the language packs on my system is 1:14.04+20140410 so they are the most recent afaik. I can't reproduce the bug in Virtualbox or on my netbook with open-source graphics drivers. But on my desktop and my laptop both using nVidia, and on a friends desktop with a Radeon card softwareproperties crash on searching for driver. In all 3 cases, my "workaround" has solved this issue. It leads me to believe that it gets triggered if: 1, Language is set to Swedish, and 2, options to use proprietary graphics drivers are available. But we should really get more people involved to test this, i think...

Revision history for this message
Josef Andersson (northar) wrote :

"i am still having this issue on my fresh install of 14.04 (no upgrade from 13.10). "

Yes, but were the fresh installs done after "license" was changed back to "license" (IE after 14-04-27) or before?

Just trying to see if the bug is still relevant for new users, as I can't reproduce it anymore with fresh installs, neither on my nvidia or ati-setup.

Revision history for this message
Josef Andersson (northar) wrote :

Sorry," license changed back to licence " and nothing else:)

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Oh, well i haven't made a NEW install since then :) But my modified SoftwarePropertiesGtk.py was overwritten after that update, reverting it to "licence" and the problem was back :/

You mean i actually need to make a reinstall to get rid of this...? Meh

Revision history for this message
Josef Andersson (northar) wrote :

"..., reverting it to "licence" and the problem was back ."".

The thing is, you shouldn't see ANY reference at all to ”license” anymore in the error messages, the correct property is ”licence”. If you see the word ”license” with an S in it, it means something is cached, not regenerated, not updated or something like that.
Could you try regenerating languagefiles on the faulty 14.04 with

sudo locale-gen
sudo dpkg-reconfigure locales

"You mean i actually need to make a reinstall to get rid of this...? Meh"
No,don't do it yet, it's the perfect test setup:)

Revision history for this message
Lars Nyström (xetea) wrote :

I just ran those commands and still see the word "license". See the attached output from my terminal.

Revision history for this message
Lars Nyström (xetea) wrote :

I just ran those commands and still see the word "license". See the attached output from my terminal.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

No, i get exactly the same traceback as stated from the beginning in this thread. However, the mystery is beginning to demystify for me now :) I took a peek at the source package for language-pack-sv-base (language-pack-sv holds no updates), and in /data/sv/LC_MESSAGES/software-properties.po on line 489 you can still see that the error is there:

msgstr "{base_description} ({license}, testad)"

I did some read up on how locales are applied, because at first, i thought that the traceback would contain the code with the locale applied to it, which apparently (to me now) isn't the case :)

Revision history for this message
Josef Andersson (northar) wrote :

yes,

msgstr "{base_description} ({license}, testad)"

is the old incorrect one and it should be

should be

msgstr "{base_description} ({licence}, tested)"

as fixed in launchpad.

Why oh why doesn't it update for you if already exists, but seems to be fine if doing a fresh install.. thats the question

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

No clue :/ What is the latest version of the language pack? 1:14.04+20140410 is the most recent one i can find here: http://se.archive.ubuntu.com/ubuntu/pool/main/l/language-pack-gnome-sv/

Is this change supposed to land in language-pack-sv-base or language-pack-sv? Both of them are the latest on my system, and i cant find anything reflecting the changes you've mentioned...

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

I downloaded the translation file directly from launchpad (software-properties.mo) and replaced it in /usr/share/locale-langpack/sv/LC_MESSAGES

Now it works! :)

So no doubt the fix solves the problem, but it seems it still hasn't found it's way to the repo's yet...
On the other hand, how come you don't get the error now? :S

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

And btw, i revise my statement a bit about when the bug gets triggered:

Looking at the code:

[code]
# gather driver description
            if current_driver['free']:
                licence = _("open source")
            else:
                licence = _("proprietary")

            if driver_status == 'recommended':
                base_string = _("{base_description} ({licence}, tested)")
            else:
                base_string = _("{base_description} ({licence})")
            description = base_string.format(base_description=description, licence=licence)

            selected = False
            if not builtin and not returned_drivers['manually_installed']:
                selected = installed
                if installed:
                    selected = True
                    one_selected = True

            returned_drivers[driver_status].setdefault(pkg_driver_name, {'selected': selected,
                                                                         'description': description,
                                                                         'builtin': builtin})
[/code]

The bug should get triggered only when the driver is "recommended" by Ubuntu devs? Could you confirm this?

Revision history for this message
Josef Andersson (northar) wrote :

Good work! That could also explain why I couldn't reproduce on my machine , if not "recommended" was found -- cause the other string "_("{base_description} ({licence})")" was never translated in launchpad from what I could see.

Next - We need to be sure that the language packs gets updated ASAP. Honestly, I don't know what and when this is triggered. I'll put the question on the official Ubuntu translator list, they should know.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

As a side note: I think we can safely translate "tested" into "testad"? That should not affect the script.

I also think there should be a note on the translation page not to translate "licence" but leave it as it is. Because i have a feeling that many other translating to other languages may do or have done the same mistake. In fact, stretching this further, i think the code should actually be rewritten so that mistakes like this cannot be done. There should be no need for translators to have any insight in the code, really..

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

I submitted bug #1319257 because i think this problem should be reported as a translation bug as the problem lies not in software-properties itself.

Revision history for this message
Josef Andersson (northar) wrote :

A query has been forwarded to the mailinglist for translators too, about updates trickling down https://lists.ubuntu.com/archives/ubuntu-translators/2014-May/thread.html
There should really be a warning for translators - do not translate.( I dont see any point in translating it partially (testad)).

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Any respond to this yet, Josef?

Revision history for this message
Josef Andersson (northar) wrote :

Nope, no news - will try to contact the https://launchpad.net/~ubuntu-translations-coordinators about the issue if nothing happens soon.

Revision history for this message
Josef Andersson (northar) wrote :

According to this https://lists.ubuntu.com/archives/ubuntu-translators/2014-May/006508.html ,
we may have to wait until end of July for the fix to trickle down:( ... for 14.04.01 that is.
For 13.10 I don't know,.

Revision history for this message
Joakim Fogelström Hardingz (birdstream) wrote :

Well, I suppose that translation errors normally isn't treated as high priority, but, in this particular case and due to the nature of this bug it should be.
Not only do i think it's a serious bug but also, uh... an embarrassing one :/
First point release is still two months away and it's really a too long of a wait to get something like this fixed imho.

Isn't there someone supremely responsible for updates that we could contact regarding this matter?

tags: added: trusty ui
Revision history for this message
Josef Andersson (northar) wrote :

I have contacted the Ubuntu Translators team.
https://launchpad.net/~ubuntu-translations-coordinators

Revision history for this message
David Planella (dpm) wrote :

Thanks for contacting the Ubuntu Translations Coordinators. I'll mark this bug as a duplicate of the other, as that already contains all the required information for the fix.

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.