]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/Importing_posts_from_Wordpress/discussion.mdwn
(no commit message)
[ikiwiki.git] / doc / tips / Importing_posts_from_Wordpress / discussion.mdwn
1 When I attempt to use this script, I get the following error:
2 warning: Not updating refs/heads/master (new tip 26b1787fca04f2f9772b6854843fe99fe06e6088 does not contain fc0ad65d14d88fd27a6cee74c7cef3176f6900ec).  I have git 1.5.6.5, any ideas?
3
4 Thanks!!
5
6 -----
7
8 ### KeyError: 146
9
10 I also get this error, here's the output (it seems to stem from an error in the python script):
11
12 <pre>
13 Traceback (most recent call last):
14   File "../ikiwiki-wordpress-import.py", line 74, in <module>
15     main(*sys.argv[1:])
16   File "../ikiwiki-wordpress-import.py", line 54, in main
17     data = content.encode('ascii', 'html_replace')
18   File "../ikiwiki-wordpress-import.py", line 30, in <lambda>
19     % htmlentitydefs.codepoint2name[ord(c)] for c in x.object[x.start:x.end]]), x.end))
20 KeyError: 146
21 warning: Not updating refs/heads/master (new tip 6dca6ac939e12966bd64ce8a822ef14fe60622b2 does not contain 60b798dbf92ec5ae92f18acac3075c4304aca120)
22 git-fast-import statistics:
23 </pre>
24
25 etc.
26
27
28 > Well, if this really is a script error, it's not really the script, but the wordpress XML dump, referring to a
29 > possible malformed or invalid unicode character in the dump file. This is what I can gather from other scripts.
30 > I'll be checking my dump file shortly.
31
32 >> This is only part of the problem... I'm not exactly sure what's going on, and it's get late/early for me....
33
34 >>> I used --force for fast-import, but then everything seems deleted, so you end up doing a reset, checkout, add, *then* commit.
35 >>> Seems really odd. I edited the script however, maybe this is why... this is my changes:
36
37     -print "data %d" % len(data)
38     +print "data %d merge refs/heads/%s\ f" % (len(data), branch)
39
40 >>> That control character is a ^q^0 in emacs, see git fast-import --help for more info.
41 >>> I'll be trying an import *without* that change, to see what happens.
42
43 >>>> (5 minutes later)
44 >>>> Removing it makes it behave sanely. heh. Learned something new :). So ignore the comment just above, except for the --force part. You have to do that because fast-import assumes a clean uninitialized space.