Bug 417951 - [bn_IN] System-config-printer is crashing
[bn_IN] System-config-printer is crashing
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
9
i386 Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: i18n
Depends On:
Blocks: F10Target
  Show dependency treegraph
 
Reported: 2007-12-10 07:06 EST by Satyabrata Maitra
Modified: 2008-07-26 02:09 EDT (History)
5 users (show)

See Also:
Fixed In Version: 0.7.82.3-2.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-17 18:27:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Satyabrata Maitra 2007-12-10 07:06:58 EST
Description of problem:
in bn_IN locale, system-config-printer is crashing for Fedora8.

Version-Release number of selected component (if applicable):
system-config-printer-0.7.74.4-3.fc8

How reproducible:
Always

Steps to Reproduce:
1. Try to open system-config-printer
2. Observe the result
3.
  
Actual results:
Its crashing

Expected results:
It should not crash and should open the apps

Additional info:
Comment 1 Tim Waugh 2007-12-12 09:00:49 EST
Do you mean this?:

$ LC_ALL=bn_IN system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3769,
in <module>
    main(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 3742,
in main
    mainwindow = GUI(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 109, in
__init__
    self.language = locale.getlocale(locale.LC_MESSAGES)
  File "/usr/lib64/python2.5/locale.py", line 460, in getlocale
    return _parse_localename(localename)
  File "/usr/lib64/python2.5/locale.py", line 373, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: bn_IN


or something else?  It is very helpful to show exactly what 'locale' says, and
also to include any traceback messages you see in ~/.xsession-errors.
Comment 2 Satyabrata Maitra 2008-01-07 05:30:59 EST
I got the following errors....
The first one when I run the command..
LC_ALL=bn_IN system-config-printer
The error was...
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3744,
in <module>
    main(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 3717,
in main
    mainwindow = GUI(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 105, in
__init__
    self.language = locale.getlocale(locale.LC_MESSAGES)
  File "/usr/lib/python2.5/locale.py", line 460, in getlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.5/locale.py", line 373, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: bn_IN

And 2nd is when I run the command...
# system-config-printer
The error was..

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3744,
in <module>
    main(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 3717,
in main
    mainwindow = GUI(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 480, in
__init__
    self.populateList(start_printer, change_ppd)
  File "/usr/share/system-config-printer/system-config-printer.py", line 730, in
populateList
    self.on_tvMainList_cursor_changed(self.tvMainList)
  File "/usr/share/system-config-printer/system-config-printer.py", line 1561,
in on_tvMainList_cursor_changed
    self.fillPrinterTab(name)
  File "/usr/share/system-config-printer/system-config-printer.py", line 1724,
in fillPrinterTab
    option.reinit (value, supported=supported)
  File "/usr/share/system-config-printer/options.py", line 119, in reinit
    self.set_widget_value (self.original_value)
  File "/usr/share/system-config-printer/options.py", line 143, in set_widget_value
    index = self.combobox_map.index (ipp_value)
ValueError: list.index(x): x not in list

So, are both the same errors? Anyway, if any other info required, pls inform.
Comment 3 Tim Waugh 2008-01-07 07:41:41 EST
What does 'lpstat -s' say?
Comment 4 Jens Petersen 2008-05-01 02:52:53 EDT
Why are you using bn_IN and not bn_IN.UTF-8?

Of course the program shouldn't crash because of an invalid or unknown locale.
Comment 5 Jens Petersen 2008-05-01 02:54:59 EDT
"LANG=bn_IN.UTF-8 system-config-printer" runs for me with pre-F9 anyway,
but not bn_IN.
Comment 6 Tim Waugh 2008-05-01 06:03:41 EDT
Changing component to python.  Reproducer:

LC_ALL=bn_IN python -c 'import locale;locale.setlocale(locale.LC_ALL,
"");locale.getlocale(locale.LC_ALL)'
Comment 7 James Antill 2008-05-01 08:47:47 EDT
Err, unless I'm missing something this isn't a "crash" python is just throwing
an exception because it can't find a particular locale ... so what?

 In yum we do this:

    try:
        locale.setlocale(locale.LC_ALL, '')
    except locale.Error, e:
        # default to C locale if we get a failure.
        print >> sys.stderr, 'Failed to set locale, defaulting to C'
        os.environ['LC_ALL'] = 'C'
        locale.setlocale(locale.LC_ALL, 'C')
Comment 8 Tim Waugh 2008-05-01 11:26:23 EDT
It's throwing ValueError, and from getlocale not setlocale.

Anyway, we now catch this and handle in upstream.
Comment 9 Fedora Update System 2008-05-09 10:47:24 EDT
system-config-printer-0.7.82.3-1.fc9 has been submitted as an update for Fedora 9
Comment 10 Fedora Update System 2008-05-13 11:21:52 EDT
system-config-printer-0.7.82.3-2.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-3820
Comment 11 Bug Zapper 2008-05-14 00:09:15 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Tim Waugh 2008-05-16 05:16:10 EDT
Works for me.
Comment 13 Fedora Update System 2008-05-17 18:27:07 EDT
system-config-printer-0.7.82.3-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2008-06-06 03:52:44 EDT
system-config-printer-0.7.74.13-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2008-07-26 02:09:41 EDT
system-config-printer-0.7.82.3-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.