Closed GoogleCodeExporter closed 9 years ago
Thanks for helping me test out livejournal translations! I'll look into this
problem
and have a fix for it in the next release. If you find a good fix for it, let
me know.
Original comment by jlu...@gmail.com
on 10 Jan 2009 at 7:40
This happens with me too.
Windows Vista SP1 Ultimate
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
I've done a quick look and found that xmlrpclib treats entries with non-ASCII
characters as xmlrpclib.Binary. Thus they are not returned as String and
replace()
will not work on them.
But if you try to use xmlrpclib.Binary.data field it will contain string and
everything will work.
The code to fix this could be this:
if isinstance(lj_event['event'], xmlrpclib.Binary):
evt = lj_event['event'].data
else:
evt = lj_event['event']
Hope this helps!
Original comment by ctpeko3a
on 12 Jan 2009 at 9:40
Thanks for the code snippet! I'll add this to the next release. Great to
know a
little more about the LiveJournal XML-RPC communication protocol.
Original comment by jlu...@gmail.com
on 12 Jan 2009 at 10:28
Original comment by jlu...@gmail.com
on 12 Jan 2009 at 10:38
Original issue reported on code.google.com by
mkevac
on 10 Jan 2009 at 1:57