Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 950988

Summary: /usr/lib/python2.4/site-packages/rhpl/genClass.py:217:_objToStr:UnicodeEncodeError
Product: Red Hat Enterprise Linux 5 Reporter: Vet <kramar>
Component: system-config-networkAssignee: Harald Hoyer <harald>
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9CC: admin, lmiksik, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Early versions of the Python programming language do not switch to the UTF-8 format correctly. This behavior led to a failure of the system-config-network service when some UTF-8 character were present in configuration files. With this update, system-config-network now resets the Python internals to properly handle UTF-8 so that system-config-network no longer crashes in the described scenario.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-16 00:18:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1049888    

Description Vet 2013-04-11 10:01:13 UTC
Component: system-config-network
                                                           Version: 1.3.99.21
                                                                             Summary: TB /usr/lib/python2.4/site-packages/rhpl/genClass.py:217:_objToStr:UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)
             Traceback (most recent call last):
                                                 File "/usr/sbin/system-config-network-tui", line 226, in ?
                                                                                                               plist = getProfileList()
                                                                                                                                         File "/usr/share/system-config-network/netconfpkg/NCProfileList.py", line 639, in getProfileList
                                                                                                                                                                                                                                             __PFList.load()
                 File "/usr/share/system-config-network/netconfpkg/NCProfileList.py", line 87, in load
                                                                                                          self.loadprof(pr, profdir)
                                                                                                                                      File "/usr/share/system-config-network/netconfpkg/NCProfileList.py", line 99, in loadprof
                                                                                                                                                                                                                                   devicelist = NCDeviceList.getDeviceList()
                                 File "/usr/share/system-config-network/netconfpkg/NCDeviceList.py", line 304, in getDeviceList
                                                                                                                                   __DVList.load()
                                                                                                                                                    File "/usr/share/system-config-network/netconfpkg/NCDeviceList.py", line 75, in load
                                                                                                                                                                                                                                            hwlist = NCHardwareList.getHardwareList()
                                          File "/usr/share/system-config-network/netconfpkg/NCHardwareList.py", line 510, in getHardwareList
                                                                                                                                                __HWList.load()
                                                                                                                                                                 File "/usr/share/system-config-network/netconfpkg/NCHardwareList.py", line 363, in load
               self.updateFromSystem()
                                        File "/usr/share/system-config-network/netconfpkg/NCHardwareList.py", line 269, in updateFromSystem
                                                                                                                                               log.log(5, str(self))
                                                                                                                                                                      File "/usr/lib/python2.4/site-packages/rhpl/genClass.py", line 550, in __str__
           return GenClass.__str__(self)
                                          File "/usr/lib/python2.4/site-packages/rhpl/genClass.py", line 179, in __str__
                                                                                                                            return self._objToStr(parentStr)
                                                                                                                                                              File "/usr/share/system-config-network/netconfpkg/NCHardwareList.py", line 328, in _objToStr
                 retstr += dev._objToStr("HardwareList.%s.%s" % (dev.Type,
                                                                            File "/usr/lib/python2.4/site-packages/rhpl/genClass.py", line 217, in _objToStr
                                                                                                                                                                retstr += "%s.%s=%s\n" % (parentStr, child, str(val))
                                                                                                                                                                                                                     UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 0: ordinal not in range(128)

                                                                         > /usr/lib/python2.4/site-packages/rhpl/genClass.py(217)_objToStr()
                                                                                                                                            -> retstr += "%s.%s=%s\n" % (parentStr, child, str(val))
                                                                                                                                                                                                    (Pdb)

Comment 2 Harald Hoyer 2014-03-12 13:14:18 UTC
Reproducer:

Run
# /usr/sbin/system-config-network-cmd -h
HardwareList.Ethernet.eth0.Status=system
HardwareList.Ethernet.eth0.Name=eth0
HardwareList.Ethernet.eth0.Type=Ethernet
HardwareList.Ethernet.eth0.Card.ModuleName=e1000
HardwareList.Ethernet.eth0.Description=Intel Corporation 82540EM Gigabit Ethernet Controller

Look for some "Description" of a PCI card.

Edit /usr/share/hwdata/pci.ids.
- find the PCI card
- add some UTF-8 chars to it. for example …

Restart the hal daemon.
# /sbin/service haldaemon restart

run
# /usr/sbin/system-config-network-tui

Comment 3 Harald Hoyer 2014-03-12 13:14:58 UTC
*** Bug 986829 has been marked as a duplicate of this bug. ***

Comment 6 Branislav Blaškovič 2014-06-04 12:19:30 UTC
No more tracebacks with:
system-config-network-tui-1.3.99.23-1.el5
system-config-network-1.3.99.23-1.el5.

Comment 8 errata-xmlrpc 2014-09-16 00:18:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1195.html