Bug 76104 - up2date bombs out with a python error
Summary: up2date bombs out with a python error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rhpl
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Jay Turner
URL:
Whiteboard:
: 75248 81001 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-16 21:13 UTC by Frode Tennebø
Modified: 2015-01-08 00:01 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-11-17 12:38:39 UTC
Embargoed:


Attachments (Terms of Use)
My up2date traceback. I get this whenever I run up2date. (2.36 KB, text/plain)
2002-10-31 01:11 UTC, Anthony Green
no flags Details
"locale" output regarding bug 81001 (duplicate of 76104) (366 bytes, text/plain)
2003-01-06 19:01 UTC, Rick Stevens
no flags Details

Description Frode Tennebø 2002-10-16 21:13:54 UTC
Description of Problem:

up2date failts with a traceback of a python-error whenever invoked.


Version-Release number of selected component (if applicable):

[ft@leia ft]$ rpm -q up2date python
up2date-3.0.7-1
python-2.2.1-17

The systems is upgraded from 7.3 (which also was an upgrade)

How Reproducible:

Always.

Steps to Reproduce:
1. start up2date
2. 
3. 

Actual Results:

Traceback (most recent call last):
  File "/usr/sbin/up2date", line 18, in ?
    from up2date_client import up2dateMessages
  File "/usr/share/rhn/up2date_client/up2dateMessages.py", line 12, in ?
    from rhpl.translate import _, N_
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 197, in ?
    cat = i18n()
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 75, in 
__init__
    self.setDomain(domain)
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 134, in 
setDomain
    self.iconv = iconv.open(self.codeset, encoding)
ValueError: (22, 'Invalid argument')

Expected Results:


Additional Information:
	
I commented out the following lines, starting from line 132 of
/usr/lib/python2.2/site-packages/rhpl/translate.py:

        #if len(self.cats) == 0:
        #    encoding = locale.nl_langinfo (locale.CODESET)
        #    self.iconv = iconv.open(self.codeset, encoding)
        #    return

Perhaps not the most elegant of solutions, but it works. I guess the code 
deals with some locale settings (BTW: I use a Norwegian keyboard and 
English language, desktop is KDE) which isn't all the important for 
functionality.

Comment 1 Adrian Likins 2002-10-18 21:10:59 UTC
Looks like a rhpl bug of some sort, but investigating...

Comment 2 Jeremy Katz 2002-10-18 21:15:58 UTC
What is the output of running `locale`?

Comment 3 Frode Tennebø 2002-10-19 21:05:41 UTC
[ft@leia ft]$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=


Comment 4 Frode Tennebø 2002-10-21 19:38:41 UTC
It appears to be a general problem with python?:

[root@leia interesting.groups]# printtool
Traceback (most recent call last):
  File "/usr/sbin/printtool", line 7, in ?
    import printconf_gui
  File "/usr/share/printconf/util/printconf_gui.py", line 41, in ?
    from printconf_conf import *
  File "/usr/share/printconf/util/printconf_conf.py", line 131, in ?
    from rhpl.translate import _, N_
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 197, in ?
    cat = i18n()
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 75, in 
__init__
    self.setDomain(domain)
  File "/usr/lib/python2.2/site-packages/rhpl/translate.py", line 134, in 
setDomain
    self.iconv = iconv.open(self.codeset, encoding)
ValueError: (22, 'Invalid argument')


Comment 5 Anthony Green 2002-10-31 01:11:14 UTC
Created attachment 82804 [details]
My up2date traceback.  I get this whenever I run up2date.

Comment 6 Need Real Name 2002-10-31 16:24:57 UTC
Check out the last response on bug# 77054

Comment 7 Mihai Ibanescu 2002-10-31 16:32:48 UTC
green: different bug. As edward.clark said, check bug# 77054


Comment 8 Adrian Likins 2002-11-04 22:51:45 UTC
looks to be rhpl issue, reassigning there...

Comment 9 Nathan Bryant 2002-12-03 17:59:59 UTC
*** Bug 75248 has been marked as a duplicate of this bug. ***

Comment 10 Jeremy Katz 2002-12-29 08:03:11 UTC
I can't reproduce this, but I've added some code to catch exceptions and fall
back gracefully.

Comment 11 Jeremy Katz 2003-01-06 16:21:41 UTC
*** Bug 81001 has been marked as a duplicate of this bug. ***

Comment 12 Rick Stevens 2003-01-06 19:01:26 UTC
Created attachment 89169 [details]
"locale" output regarding bug 81001 (duplicate of 76104)

I submitted bug 81001 about the redhat-config-printer and
redhat-config-soundcard
scripts dying out.  This was determined to be a duplicate of bug 76104.  Since
one
of the attachments to this bug was the output of the "locale" command (which
reported the locale as "C", I thought a bit more info from my system might be
of
use.  This attachment shows my locale, reported as "en_US.UTF-8".  By the way,
this also occurs when the locale is merely "en_US" (without the ".UTF-8"). 
Again, the system is an 8.0 upgrade from 7.2.

If you need access to my system to debug this, I can arrange it as the system
is
on a broadband connection with a NAT device to redirect SSH access (with X
window tunneling) to the machine.  Contact me via email directly to get a login

and password.

Comment 13 Rick Stevens 2003-01-07 09:31:29 UTC
I've done a bit of research.  I'm not a python guy so take this with a grain of
salt, but it appears that the /usr/lib/python2.2/locale.py module does NOT contain
the nl_langinfo() method, so "encoding = locale.nl_langinfo (locale.CODESET)" in
/usr/lib/python2.2/site-packages/rhpl (line 201) will fail.  I suspect that this
is the root of the problem.

A quick "grep -r nl_langinfo *" from that directory shows that
"lib-dynload/_localemodule.so" has it, but except for the call in the rhpl
directory, there are no other references.

Hope that helps.

Comment 14 Frode Tennebø 2003-11-17 12:38:39 UTC
Works now (RH9).


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