Invalid token error with blogger2movabletype.sh

22 views
Skip to first unread message

Erik

unread,
Sep 3, 2009, 1:25:08 PM9/3/09
to Google Blog Converters
Hi there,

I'm trying to move posts and comments from a Wordpress blog to an
ExpressionEngine site. It turns out there are no good current
documented methods for this. The least-painful approach I've found has
been to use the Google Blog Converter tools to first convert the
Wordpress exported XML to blogger, and then go from the blogger format
to MovableType (ExpressionEngine has a native import tool for MT).

I've gotten as far as converting the Wordpress XML to Blogger format
using wordpress2blogger. So now I've got my entries and comments in
Blogger XML format. When I try to run blogger2movabletype on this
file, though, I get this output:

Traceback (most recent call last):
File "bin/../src/blogger2movabletype/b2mt.py", line 189, in ?
translator = Blogger2MovableType(wp_xml_doc)
File "bin/../src/blogger2movabletype/b2mt.py", line 59, in __init__
self.feed = atom.FeedFromString(self.doc)
File "/home/nicolebujewski/webapps/django/lib/atom/__init__.py",
line 1287, in FeedFromString
return CreateClassFromXMLString(Feed, xml_string)
File "/home/nicolebujewski/webapps/django/lib/atom/__init__.py",
line 97, in CreateClassFromXMLString
tree = ElementTree.fromstring(xml_string)
File "<string>", line 85, in XML
SyntaxError: not well-formed (invalid token): line 2, column 3132566

Line 3132566 is somewhere in the middle of all the Blogger XML. I know
very little about XML and what it takes to shape up a malformed
document, so I'm now totally stuck. Any suggestions on how I could
move forward?

Thanks!

Erik

JJ Lueck

unread,
Sep 8, 2009, 1:19:04 PM9/8/09
to Google Blog Converters
Hi Erik.

This is very peculiar as it indicates that the output of the
wordpress2blogger conversion is giving invalid XML. Please try to
upload the converted file to an XML validation site, such as
http://www.xmlvalidation.com/ to see exactly where the error is in the
document. Send along that information and it'll be easier to diagnose
the problem.

Sorry for the problems. Thanks for the converters.

-JJ.

Erik Kraft

unread,
Sep 8, 2009, 7:10:21 PM9/8/09
to google-blog...@googlegroups.com
Thanks for the reply and the suggestion! I realized that the Wordpress comments table was hanging on to every single spammy comment that had ever been submitted, even though they'd been flagged as junk and (I thought) deleted. Unsurprisingly, many spam comments have content that doesn't parse as valid XML! I did a manual cleanout of the comments table and redid the Wordpress to blogger to Movable Type conversion process, with no XML errors.

Thanks again!

Erik
Reply all
Reply to author
Forward
0 new messages