Description of problem: Spacecmd have troubles outputting text that is uses certain characters, example \u201c and \u2019 Version-Release number of selected component (if applicable): spacecmd-1.8.14-1.el.noarch How reproducible: * Always? Steps to Reproduce: 1. Import EPEL channel to Satellite 2. Use spacecmd to get errata details (e.g. errata FEDORA-EPEL-2012-13557 contains mentioned characters. If output is piped to something it will complain: "ERROR: 'ascii codec can't encode character u'\u201c' in position 275: ordinal not in range(128)" 3. You want to find packages affected by an errata: # spacecmd -q -- errata_details FEDORA-EPEL-2012-13557 | grep "Affected Packages" -A 1000 | grep -e "Affected Packages" -e "\-\-\-\-\-\-\-" -v | sort | uniq ERROR: 'ascii' codec can't encode character u'\u201c' in position 275: ordinal not in range(128) 4. The problem lies in the characters used in the errata's description field. Actual results: # spacecmd -q -- errata_details FEDORA-EPEL-2012-13557 | grep "Affected Packages" -A 1000 | grep -e "Affected Packages" -e "\-\-\-\-\-\-\-" -v | sort | uniq ERROR: 'ascii' codec can't encode character u'\u201c' in position 275: ordinal not in range(128) Expected results: # spacecmd -q -- errata_details FEDORA-EPEL-2012-13557 | grep "Affected Packages" -A 1000 | grep -e "Affected Packages" -e "\-\-\-\-\-\-\-" -v | sort | uniq pytest-2.3.4-1.el6.noarch python-py-1.4.12-1.el6.noarch Additional info: This can be fixed by setting the encoding in the following file: _/usr/lib/python2.6/site-packages/spacecmd/errata.py_ Add: import sys import codecs import locale sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout) There is probably a more sane approach to fix this, hopefully someone can either consider this as a fix, or provide a better way of solving this.
Forwarding to upstream.
Fixed in spacewalk.git master: b1a88c309b7b20b715f82834078a8c84749ebfc3
Spacewalk 2.2 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22