[KPhotoAlbum] kpaxml2mysql.py fails on my DB

Shawn Willden shawn-kimdaba at willden.org
Tue Apr 24 17:49:36 CEST 2007


I thought it would be interesting to experiment with the current state of the 
SQL backend, so I tried to use the script to convert my XML DB and put it in 
mysql.

Any suggestions?  If you'd like to look at my database, I uploaded a copy to 
my web server.  You can get it at:

	http://willden.org/~shawn/index.xml.bz2

Connecting to database...connected.
WARNING!
This script will mess up your database (kpa).
Are you sure you want to continue? yes
Parsing the XML file...parsed.
Do you want to clear the tables before copying? yes
Clearing...cleared
Copying data to the MySQL database................Traceback (most recent call 
last):
  File "./kpaxml2mysql.py", line 106, in ?
    sys.exit(main(sys.argv))
  File "./kpaxml2mysql.py", line 99, in main
    destDb.feedFrom(srcDb, showProgress)
  
File "/home/shawn/sources/kphotoalbum/KPhotoAlbum-src/kphotoalbum/script/KPhotoAlbum/db.py", 
line 115, in feedFrom
    for i in other.mediaItems:
  
File "/home/shawn/sources/kphotoalbum/KPhotoAlbum-src/kphotoalbum/script/KPhotoAlbum/xmldb.py", 
line 176, in __iter__
    yield self.__getMediaItem(i)
  
File "/home/shawn/sources/kphotoalbum/KPhotoAlbum-src/kphotoalbum/script/KPhotoAlbum/xmldb.py", 
line 219, in __getMediaItem
    item = category.items[n]
KeyError: 7536748

	Shawn.


More information about the KPhotoAlbum mailing list