Bug 76104 - up2date bombs out with a python error
up2date bombs out with a python error
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rhpl (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Jay Turner
:
: 75248 81001 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-16 17:13 EDT by Frode Tennebø
Modified: 2015-01-07 19:01 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-17 07:38:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Frode Tennebø 2002-10-16 17:13:54 EDT
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 17:10:59 EDT
Looks like a rhpl bug of some sort, but investigating...
Comment 2 Jeremy Katz 2002-10-18 17:15:58 EDT
What is the output of running `locale`?
Comment 3 Frode Tennebø 2002-10-19 17:05:41 EDT
[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 15:38:41 EDT
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-30 20:11:14 EST
Created attachment 82804 [details]
My up2date traceback.  I get this whenever I run up2date.
Comment 6 Need Real Name 2002-10-31 11:24:57 EST
Check out the last response on bug# 77054
Comment 7 Mihai Ibanescu 2002-10-31 11:32:48 EST
green: different bug. As edward.clark@phoenix.edu said, check bug# 77054
Comment 8 Adrian Likins 2002-11-04 17:51:45 EST
looks to be rhpl issue, reassigning there...
Comment 9 Nathan Bryant 2002-12-03 12:59:59 EST
*** Bug 75248 has been marked as a duplicate of this bug. ***
Comment 10 Jeremy Katz 2002-12-29 03:03:11 EST
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 11:21:41 EST
*** Bug 81001 has been marked as a duplicate of this bug. ***
Comment 12 Rick Stevens 2003-01-06 14:01:26 EST
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 04:31:29 EST
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 07:38:39 EST
Works now (RH9).

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