[KPhotoAlbum] kpaxml2mysql.py fails on my DB

Shawn Willden shawn-kimdaba at willden.org
Tue Apr 24 16:49:36 BST 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 

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


Connecting to database...connected.
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
Copying data to the MySQL database................Traceback (most recent call 
  File "./kpaxml2mysql.py", line 106, in ?
  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


More information about the Kphotoalbum mailing list