Quickshot crashes on unknown locale

Bug #554861 reported by Kevin Godby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickshot
Fix Released
Medium
Simon Vermeersch

Bug Description

If Quickshot doesn't recognize the locale, it crashes when it first starts, but doesn't present a GUI error message to the user.

Revision history for this message
Kevin Godby (godbyk) wrote :
Revision history for this message
Kevin Godby (godbyk) wrote :
Revision history for this message
Neil Tallim (red-hamsterx) wrote :

This is probably a "Won't Fix", since we don't have the architecture to report errors at this stage, but it will be fixed in 1.0.

Changed in quickshot:
importance: Undecided → Medium
assignee: nobody → titeuf (simonvermeersch)
Revision history for this message
Neil Tallim (red-hamsterx) wrote :

Er... I meant "Invalid". Or something.

The status indicators aren't really meant for alpha-stage projects.

Revision history for this message
Simon Vermeersch (simonvermeersch) wrote :

This bug happens when python-babel doesn't recognize a certain locale, like Latin in this case.

I've added in a quick workaround so it won't crash anymore, the only downside is that you'll see "la" now instead of "Latin" when the language isn't recognized, but that's better than crashing.

I'll look into properly fixing that too for future versions.

Changed in quickshot:
status: New → Fix Committed
Revision history for this message
Luke Jennings (ubuntujenkins) wrote :

also affects netherlands (aruba) in the latest version of quickshot both in bzr and released version

Mask' as enum when in fact it is of type 'GFlags'
Using http://screenshots.ubuntu-manual.org/ for network operations
Completing window initialisation
Determining active language
Traceback (most recent call last):
  File "/usr/bin/quickshot", line 673, in <module>
    window = NewQuickshotWindow()
  File "/usr/bin/quickshot", line 636, in NewQuickshotWindow
    window.finish_initializing(builder)
  File "/usr/bin/quickshot", line 140, in finish_initializing
    get("languagelabel").set_text(self.get_active_language()[1])
  File "/usr/bin/quickshot", line 326, in get_active_language
    short_code = locale.getdefaultlocale()[0]
  File "/usr/lib/python2.6/locale.py", line 478, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.6/locale.py", line 410, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: nl_AW

Changed in quickshot:
status: Fix Committed → Confirmed
Revision history for this message
Bojan Bogdanović (bojce) wrote :

It`s affects on Serbian language:

quickshot@quickshot-computer:~$ quickshot
** (quickshot:6308): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'
** (quickshot:6308): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'
** (quickshot:6308): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/usr/bin/quickshot", line 673, in <module>
    window = NewQuickshotWindow()
  File "/usr/bin/quickshot", line 636, in NewQuickshotWindow
    window.finish_initializing(builder)
  File "/usr/bin/quickshot", line 140, in finish_initializing
    get("languagelabel").set_text(self.get_active_language()[1])
  File "/usr/bin/quickshot", line 326, in get_active_language
    short_code = locale.getdefaultlocale()[0]
  File "/usr/lib/python2.6/locale.py", line 478, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.6/locale.py", line 410, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: sr_RS

Revision history for this message
Luke Jennings (ubuntujenkins) wrote :

I can confirm that it doesn't work for any of the Serbian language locals.

Revision history for this message
Luke Jennings (ubuntujenkins) wrote :

This is related to the python locale module I have filled a bug on it here http://bugs.python.org/issue8374

Revision history for this message
Luke Jennings (ubuntujenkins) wrote :

The latest cd and ppa updates fix this.

Changed in quickshot:
status: Confirmed → 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.