X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f67c714c5011684884e7fc8485278ab282aea8a3..e112b8f385992ec4b3056d397802abe092547bb5:/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn diff --git a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn index 9befe3f22..f1028bc38 100644 --- a/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress/discussion.mdwn @@ -1,3 +1,18 @@ +Using a new debian 6.0.5 system, I get the following error trying to run the script: + + ~/bin/ikiwiki-wordpress-import.py "Name" email@domain log < ~/share/wordpress.2012-08-23.xml.edited | git-fast-import + Traceback (most recent call last): + File "/home/luke/bin/ikiwiki-wordpress-import.py", line 139, in + main(*sys.argv[1:]) + File "/home/luke/bin/ikiwiki-wordpress-import.py", line 65, in main + content += x.find('content:encoded').string.replace('\r\n', '\n') + AttributeError: 'NoneType' object has no attribute 'replace' + git-fast-import statistics: + +Any ideas on what I am doing wrong would be appreciated. + +----- + When I attempt to use this script, I get the following error: warning: Not updating refs/heads/master (new tip 26b1787fca04f2f9772b6854843fe99fe06e6088 does not contain fc0ad65d14d88fd27a6cee74c7cef3176f6900ec). I have git 1.5.6.5, any ideas? @@ -24,10 +39,6 @@ git-fast-import statistics: etc. +(Removed now dead info and blah blah.) -> Well, if this really is a script error, it's not really the script, but the wordpress XML dump, referring to a -> possible malformed or invalid unicode character in the dump file. This is what I can gather from other scripts. -> I'll be checking my dump file shortly. - ->> This is only part of the problem... I'm not exactly sure what's going on, and it's get late/early for me.... - +> It works fine.... The script is picky about having everything in proper UTF-8, **and** proper XML and HTML escaping. You need that to have a successful import. I let Emacs remove DOS line endings, and it works OK (if on *nix of some sort, of course). Thing is with this `git fast-import`, is that you have to `git reset` afterwards, (let's say you put them in posts/) `git checkout posts`, `git add posts`, then commit. I don't know if this a characteristic with `git fast-import`, but this is the way I get my posts to exist on the filesystem. If I don't do this, then I lose the data. If you get that "Not updating..." error, then just --force the import in. --[[users/simonraven]]