[Spacewalk-list] 1.9 and Unicode

Ciro Iriarte cyruspy at gmail.com
Fri Aug 2 04:41:31 UTC 2013


Hi!, a new 1.9 installation is exhibiting the same behaviour and
unnluckily I can't just "delete the problematic host" this time. This
was a new installation on CentOS 6.

Tried upgrading to 2.0 (server and client side) to see if the error
goes away but it's still there.

Logs:

---
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24] mod_wsgi
(pid=28916): Exception occurred processing WSGI script
'/usr/share/rhn/wsgi/xmlrpc.py'.
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24] Traceback (most
recent call last):
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/share/rhn/wsgi/xmlrpc.py", line 22, in application
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]     return
wsgiHandler.handle(environ, start_response, "xmlrpc", "server.xmlrpc")
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/share/rhn/wsgi/wsgiHandler.py", line 45, in handle
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]     ret = appServ(req)
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/lib/python2.6/site-packages/spacewalk/server/apacheHandler.py",
line 196, in handler
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]     ret =
self._req_processor.process()
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py",
line 486, in process
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]     return
self.call_function(method, params)
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py",
line 175, in call_function
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]
Traceback(method, self.req, severity="unhandled")
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py", line
150, in Traceback
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]
ostream.write("%s\\n" % exc.getvalue().encode('utf-8'))
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]   File
"/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]     self.buf +=
''.join(self.buflist)
[Thu Aug 01 23:55:47 2013] [error] [client 10.1.30.24]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
48: ordinal not in range(128)

---

Regards,
CI.-

2013/5/6 Ciro Iriarte <cyruspy at gmail.com>:
> Hi!, I'm not sure why, but adding other hosts worked. I ended up
> deleting the problematic host (the first I tried), now I have 6
> virtual machines correctly added to spacewalk..
>
> Regards,
> CI.-
>
> 2013/4/30 Jan Pazdziora <jpazdziora at redhat.com>:
>> On Mon, Apr 29, 2013 at 08:48:22PM -0400, Ciro Iriarte wrote:
>>> > [Sun Apr 28 17:42:46 2013] [error] [client 10.1.20.201]   File
>>> > "/usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py", line
>>> > 150, in Traceback
>>> > [Sun Apr 28 17:42:46 2013] [error] [client 10.1.20.201]
>>> > ostream.write("%s\\n" % exc.getvalue().encode('utf-8'))
>>
>> [...]
>>
>>> Hi!, I'm seeing the same error...
>>>
>>> [Mon Apr 29 20:45:34 2013] [error] [client 10.1.20.201]   File
>>> "/usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py", line
>>> 150, in Traceback
>>> [Mon Apr 29 20:45:34 2013] [error] [client 10.1.20.201]
>>> ostream.write("%s\\n" % exc.getvalue().encode('utf-8'))
>>
>> That's weird. Did you restart httpd? Because the original error line
>> was 150 and the current line seems to be 150 even if the patch
>>
>>> --- /usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py.orig
>>>  2013-04-29 19:56:51.387243659 -0400
>>> +++ /usr/lib/python2.6/site-packages/spacewalk/common/rhnTB.py
>>> 2013-04-29 19:57:57.986933719 -0400
>>> @@ -148,6 +148,11 @@ def Traceback(method = None, req = None,
>>>      # we always log it somewhere
>>>      if ostream:
>>>          ostream.write("%s\n" % exc.getvalue().encode('utf-8'))
>>> +       the_value = exc.getvalue()
>>> +       if isinstance(the_value, unicode):
>>> +               ostream.write("%s\n" % exc.getvalue().encode('utf-8'))
>>> +       else:
>>> +               ostream.write("%s\n" % exc.getvalue())
>>>
>>>      if mail:
>>>          # print the stack frames for the mail we send out
>>
>> should have moved it to line 152.
>>
>> --
>> Jan Pazdziora
>> Principal Software Engineer, Satellite Engineering, Red Hat
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
>
>
> --
> Ciro Iriarte
> http://cyruspy.wordpress.com
> --



-- 
Ciro Iriarte
http://cyruspy.wordpress.com
--




More information about the Spacewalk-list mailing list