Bug 463743

Summary: rhn-manage-channel-internal throws an unicode related exception
Product: [Retired] Red Hat Network Reporter: Daniel Mach <dmach>
Component: RHN/Content ToolsAssignee: rhn-dev-list
Status: CLOSED EOL QA Contact: Red Hat Network Quality Assurance <rhn-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: RHN StableCC: acarter, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: us=49605
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-05 15:18:09 UTC Type: ---
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: 578256, 428922    

Description Daniel Mach 2008-09-24 13:52:48 UTC
$ rhn-manage-channel-internal --server=scripts.back-webdev.redhat.com --list-all
ends with following exception:

ERROR: unhandled exception occurred: ('ascii' codec can't encode character u'\xe9' in position 90: ordinal not in range(128)).
  File "/usr/bin/rhn-manage-channel-internal", line 24, in ?
    sys.exit(mod.rhn_manage_channel_internal.main() or 0)
  File "/usr/share/rhn/content_mgmt_internal/rhn_manage_channel_internal.py", line 397, in main
    cli.run()
  File "/usr/share/rhn/content_mgmt_libs/cli.py", line 53, in run
    sys.exit(self.main() or 0)
  File "/usr/share/rhn/content_mgmt_internal/rhn_manage_channel_internal.py", line 92, in main
    return display_channels(channelobj, labels)
  File "/usr/share/rhn/content_mgmt_internal/rhn_manage_channel_internal.py", line 388, in display_channels
    prettyprint([data[x] for x in fh])
  File "/usr/share/rhn/content_mgmt_internal/rhn_manage_channel_internal.py", line 393, in prettyprint
    print u",".join([unicode(x) for x in data])



Fix seems to be quite easy, but I haven't tested it much.
change line 393:
print u",".join([unicode(x) for x in data])
to this:
print ",".join([unicode(x).encode("utf-8") for x in data])

Comment 3 Daniel Mach 2010-04-01 11:21:25 UTC
*** Bug 565499 has been marked as a duplicate of this bug. ***

Comment 4 Thomas "Shea" DeAntonio 2017-07-05 15:18:09 UTC
As you may already be aware, Red Hat is transitioning from the Red Hat Network (RHN) hosted interface to the Red Hat Subscription Management (RHSM) interface in July 2017. Red Hat has invested in and seen success from RHN for many years, and used that experience to build more robust technologies like RHSM. 
 
If you have not yet migrated your RHN systems to RHSM or you are a Red Hat Satellite customer, please review the information from. https://access.redhat.com/products/red-hat-subscription-management#migration. 
 
Since we are shutting down RHN, no further actions will be taken with this bug or enhancement request.  You can find additional information at RHSM product page (https://access.redhat.com/products/red-hat-subscription-management).  If you have further questions, please contact support (https://access.redhat.com/products/red-hat-subscription-management#support).