[Spacewalk-list] UnicodeEncodeError with schedule or rhn_check

Nablas nablas at gmail.com
Thu May 13 12:28:37 UTC 2010


Hello, I have a problem with configuration channels. I configured a channel
with two files and it worked until last upgrade to SpaceWalk 1.0. Now I get
the following traceback. I think the problem is caused when the server
schelude a file comparison to the client. The client excutes the script and
it returns a message in local language. In my case, at position 435, the
script finds "ú" (0xFA) so it aborts with error.

I found a workaround: export LANGUAGE, LANG or similar variable with English
before executing rhn_check, but I'll have to modify several systems.

¿Any idea to solve the problem?




====================================================================
Exception reported from spacewalk
Time: Thu May 13 01:47:09 2010
Exception type exceptions.UnicodeEncodeError
Exception while handling function queue.submit
Request object information:
URI: /XMLRPC
Remote Host: XXXXXXXXXXXXXXXX
Server Name: localhost.localdomain:0
Headers passed in:
    Accept-Encoding: identity
    Content-Length: 10244
    Host: XXXXXXXXXXXXXXXX
    content-type: text/xml
    user-agent: rhn.rpclib.py/$Revision: 190936 $
    x-client-version: 1
    x-info: RPC Processor (C) Red Hat, Inc (version 191735)
    x-rhn-client-capability:
packages.verifyAll(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1,packages.verifyAll(1)=1,packages.verify(1)=1,packages.extended_profile(2)=1,configfiles.base64_enc(1)=1,reboot.reboot(1)=1,configfiles.deploy(1)=1,caneatCheese(1)=1,packages.rollBack(1)=1,configfiles.mtime_upload(1)=1,configfiles.diff(1)=1,packages.update(2)=2,script.run(1)=1,configfiles.upload(1)=1,packages.runTransaction(1)=1
    x-rhn-transport-capability: follow-redirects=3
    x-transport-info: Extended Capabilities Transport (C) Red Hat, Inc
(version 190936)
    x-up2date-version: 0.8.12-1.el5
Extra information about this error:
Response sent back to the caller:
While running 'queue.submit': caught
exceptions.UnicodeEncodeError : 'ascii' codec can't encode character u'\xfa'
in position 435: ordinal not in range(128)



Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheRequest.py", line 120, in call_function
    response = apply(func, params)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 424, in submit
    action_type=action_type)
  File "/usr/share/rhn/server/handlers/xmlrpc/queue.py", line 474, in
process_extra_data
    result = method(self.server_id, action_id, data=data)
  File "/usr/share/rhn/server/action_extra_data/configfiles.py", line 154,
in diff
    _process_diffs(server_id, action_id, diffs)
  File "/usr/share/rhn/server/action_extra_data/configfiles.py", line 239,
in _process_diffs
    _add_result(action_config_revision_id, diff)
  File "/usr/share/rhn/server/action_extra_data/configfiles.py", line 291,
in _add_result
    result.write(diff)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfa' in position
435: ordinal not in range(128)

Local variables by frame
Frame _add_result in /usr/share/rhn/server/action_extra_data/configfiles.py
at line 291
                       h = <type 'instance'> <__builtin__.OracleCursor on
<cx_Oracle.Connection to spacewalk at XE>>
                    diff = <type 'unicode'> <ERROR WHILE PRINTING VALUE>
                  result = <type 'cx_Oracle.LOB'>
    action_config_revision_id = <type 'int'> 195
                     row = <type 'dict'> {'result': <cx_Oracle.LOB object at
0x2b980cc262d0>}

Frame _process_diffs in
/usr/share/rhn/server/action_extra_data/configfiles.py at line 239
                   diffs = <type 'dict'> {'
.
.
.
.
.
====================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20100513/a99700b4/attachment.htm>


More information about the Spacewalk-list mailing list