Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error reading #5

ylansegal opened this Issue · 10 comments

7 participants


Hey, thanks for making this available. I am getting the following error:

$ python
reading: wordpress-xml/wordpress.2011-08-25.xml
Traceback (most recent call last):
  File "", line 299, in <module>
  File "", line 135, in parse_wp_xml
    'items': parse_items(),
  File "", line 119, in parse_items
    'date' : gi('wp:post_date'),
  File "", line 99, in gi
AttributeError: 'NoneType' object has no attribute 'text'



it's either some property or xml namespace that does not exist or a tag that is supposed to be required but does not exist..It is a good idea to add more exception handling around these parts of the application.
If you can send me the wordpress.xml file either in private or paste it here i could take a look at an stack trace and speed up finding out whats wrong since I don't have very much time available for this project right now.



I sent you the wordpress file by email. Thanks a lot!


it seems like you have exported from wordpress 3.0,,, only wordpress 3.1 or later is supposed to be supported.
Do you have the possibility to upgrade your wordpress installation?


FYI, I'm having the same issue with export from today. The export is with export 1.0 XML namespace.


I have similar error from xml by blog. I get:

reading: wordpress-xml/blog.xml
Traceback (most recent call last):
File "", line 296, in
File "", line 61, in parse_wp_xml
File "/usr/lib/python2.6/xml/etree/", line 586, in parse
File "/usr/lib/python2.6/xml/etree/", line 1245, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: unbound prefix: line 107, column 1

can you help me about?


Same here, I'm doing it from wordpress 3.3.1 and SOLVED deleting more than 1200 spam comments ...

@amithgeorge amithgeorge referenced this issue from a commit in amithgeorge/exitwp
@amithgeorge amithgeorge fixed issue #5
wordpress exports the xml namespace wp with the url ...
the code was expecting

Have the same issue with an export of 3.3.1.


My <rss> tag from a 3.3.1 export looks like this:

<rss xmlns:excerpt="" xmlns:content="" xmlns:wfw="" xmlns:dc="" xmlns:wp="" version="2.0">

Can confirm that @amithgeorge's commit fixes this issue for me!


Confirmed. RSS is the same. Mentioned commit fixed the issue for me as well. thx

@amithgeorge amithgeorge referenced this issue from a commit in amithgeorge/exitwp
@amithgeorge amithgeorge better fix for issue #5
the code now parses and generates the required xml prefixes and namespaces.
no need to hard code any uris. works with the wp namespace version 1.2 and 1.1 ...
Tested against my Wordpress 3.3.1 exported xml
@thomasf thomasf closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.