Zenossians,
I'm running my Zenoss server on CentOS 4.4, and due to this I'm stuck
with Python-2.3. After upgrading to the latest SVN trunk of Zenoss my
zenwin service on my Windows server no longer worked. It was throwing
exceptions like "dictionary key must be string."
The cause of the exception ended up being the xmlrpclib that goes with
Python-2.3. It doesn't properly support unicode, which Zenoss has
started using extensively as of late. If you, like I, are unable to
upgrade to Python-2.4, you can apply this patch to your xmlrpclib
(usually in /usr/lib/python2.3/xmlrpclib.py)
@@ -689,7 +689,10 @@
for k in value.keys():
write("<member>\n")
if type(k) is not StringType:
- raise TypeError, "dictionary key must be string"
+ if unicode and type(k) is UnicodeType:
+ k = k.encode(self.encoding)
+ else:
+ raise TypeError, "dictionary key must be string"
write("<name>%s</name>\n" % escape(k))
dump(value[k], write)
write("</member>\n")
On a related note. Does anyone know of a good way to use python-2.4 on CentOS 4?
--
Chet Luther
[EMAIL PROTECTED]
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users