achievingclarity / wxr2blogger

Automatically exported from code.google.com/p/wxr2blogger
GNU General Public License v2.0
0 stars 1 forks source link

ExpatError instead of atom-xml files #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Normal usage as intended.

What is the expected output? What do you see instead?
I get an error message (I suppose) instead of Atom-formatted files.

What version of the product are you using? On what operating system?
Newest version on Mac OS X.

Please provide any additional information below.
This is the output:

Traceback (most recent call last):
  File "/Users/Michael/Downloads/wxr2blogger-1.0/wxr2blogger", line 107, in <module>
    p = parseString(u.encode("utf-8"))
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/minidom.py", line 1923, in parseString
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/expatbuilder.py", line 940, in parseString
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/dom/expatbuilder.py", line 223, in parseString
xml.parsers.expat.ExpatError: unbound prefix: line 1421, column 0

Original issue reported on code.google.com by m.kal...@gmail.com on 27 Aug 2008 at 5:59

GoogleCodeExporter commented 8 years ago
This looks like it's choking on your WXR file.  Can you send me the contents of 
line 1421 of the file, plus a few 
lines in and around that?  Maybe we can figure out what's going on.

Original comment by rjwalsh%...@gtempaccount.com on 27 Aug 2008 at 8:17

GoogleCodeExporter commented 8 years ago
Voila, the whole item (the line with the ** is line no 1421):

<item>
 <title>Festgestellt</title>
<link>http://3th.be/?page_id=903</link>
<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
<dc:creator><![CDATA[Michael]]></dc:creator>
<category><![CDATA[Text]]></category>
<category domain="category" nicename="text"><![CDATA[Text]]></category>
<guid isPermaLink="false">http://3th.be/?page_id=903</guid>
<description></description>
<content:encoded><![CDATA[1. Coca-Cola schmeckt nur aus dem Eiskasten wirklich 
gut. (Eiswürfel nehmen dem Getränk die Süße, 
dadurch wird es noch besser.)]]></content:encoded>
** <excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>903</wp:post_id>
<wp:post_date>0000-00-00 00:00:00</wp:post_date>
<wp:post_date_gmt>0000-00-00 00:00:00</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name></wp:post_name>
<wp:status>draft</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type>page</wp:post_type>
<wp:post_password></wp:post_password>
<wp:postmeta>
<wp:meta_key>_edit_lock</wp:meta_key>
<wp:meta_value>1219058119</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_edit_last</wp:meta_key>
<wp:meta_value>2</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>_wp_page_template</wp:meta_key>
<wp:meta_value>default</wp:meta_value>
</wp:postmeta>
</item>

Original comment by m.kal...@gmail.com on 28 Aug 2008 at 7:37

GoogleCodeExporter commented 8 years ago
Yup - someone else reported that, too.  It's actually a malformed XML file 
output by WordPress.  As a workaround, 
look at the top of the file and you should see something like this (about 19 
lines down):

    <rss version="2.0"
           xmlns:content="http://purl.org/rss/1.0/modules/content/"
           xmlns:wfw="http://wellformedweb.org/CommentAPI/"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:wp="http://wordpress.org/export/1.0/"
    >

Add the following in before the last ">":

            xmlns:excerpt="http://www.example.com/the/excerpt/namespace"

so that the it looks like this:

    <rss version="2.0"
           xmlns:content="http://purl.org/rss/1.0/modules/content/"
           xmlns:wfw="http://wellformedweb.org/CommentAPI/"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:wp="http://wordpress.org/export/1.0/"
           xmlns:excerpt="http://www.example.com/the/excerpt/namespace"
    >

and try again.  I'll update the README.  There's not much else I can do until 
WordPress fixes this.

Original comment by rjwalsh%...@gtempaccount.com on 28 Aug 2008 at 7:43

GoogleCodeExporter commented 8 years ago
I've filed a ticket with WordPress here:

  http://trac.wordpress.org/ticket/7624

I will leave this issue open until I hear more about this from WordPress.

Original comment by rjwalsh%...@gtempaccount.com on 28 Aug 2008 at 8:12

GoogleCodeExporter commented 8 years ago

Original comment by rjwalsh%...@gtempaccount.com on 28 Aug 2008 at 8:14

GoogleCodeExporter commented 8 years ago
Looks like someone at WordPress has updated the ticket with a patch.  No idea 
when this will be included in a 
release, though.

Original comment by rjwalsh%...@gtempaccount.com on 5 Oct 2008 at 7:32