3 Replies Latest reply: Dec 18, 2009 4:27 AM by kowalsky
jaredcolin Level 1 Level 1
I was fooling around with my library trying to get it to work properly within another program (Native Instruments Traktor Pro) and goofed it up.

My entire library (lib, xml and mp3s) reside on an external hard drive. Somehow the lib was overwritten with an older version. My xml file looks to be okay though (all 23.3 Mb of it), so in following the instructions for re-creating my library from the .xml (http://support.apple.com/kb/HT1451) I get:

The file "iTunes Library.xml" cannot be imported. An unknown error occurred (-50).

About 11,000 of my 15,000 mp3s get added but no ratings, play counts, date added or playlists make it over. Any ideas?

MacBookPro4,1, Mac OS X (10.5.8), iTunes 9.0.1
  • jaredcolin Level 1 Level 1
    okay, i've resolved most of the issue. did some more googling which led me to this:


    so i opened up my itunes library.xml with textmate and ran the XML syntax validation. it found that there were two songs which contained invalid characters in their metadata. i removed those characters and voila the import playlist completed (took 47 minutes!). but it did not bring over the 'date added' value (even though it is stored in the xml library). instead date added was today.

    i understand why this makes sense technically, but is there any way around it? can i replace the date added value in the actual iTunes Library with the value in the iTunes Library.xml?
  • larrydog Level 1 Level 1
    I had the same problem today with iTunes After the error popped up, I found I had 5634 tracks successfully loaded. I opened the xml file with an editor, and went to track 5635 to see what was amiss. I found that the composer of the track was Spanish, and had an "í" in his name (that's a code 0237, not an i). I removed this, deleted the .itl, launched iTunes and re-imported the xml. This worked and got me a few hundred tracks farther, where I encountered the same thing. One more quick edit, and all is good. What is strange about this is that there are lots of foreign characters in my tags -- the importer doesn't choke on all of them, but it sure doesn't like code 0237 in a Composer tag. The error text could have been a little more informative. Hope this helps the next guy.
  • kowalsky Level 1 Level 1
    Hi Jaredcolin,

    thanks for the tip!

    I had the same problem, but textmate crashes during syntax validation (in my case, the size of the itunes music library.xml is 148mb).

    So I tried textwrangler and opened the xml file - Upon opening I received a message: "UTF-8 file is damaged, ....proceed with caution".

    After proceeding I saved the itunes library with a new name and it works!

    In Traktor Pro vers.1.2.3 i now have all my musicfiles (about 520Gb) and it works pretty good.