Fat Cat Software

Problems syncing photos with iPod, iPhone, or Apple TV and iPhoto 8.1

Update: 3/30/10 According to Apple, this bug has been fixed with the iPhoto 8.1.2 updateA bug has recently cropped up in iPhoto (version 8.1 appears to be the first version with the bug, and the bug remains as of version 8.1.1) which can cause problems when attempting to sync your photos using iTunes to any device, such as an iPod, iPhone, or Apple TV. I've seen a whole bunch of reports of iPhoto Library Manager users encountering this bug, enough that I thought a blog post describing the problem and the solution would be helpful.SymptomsIf you suffer from this bug, when you open iTunes and attempt to sync a device with your iPhoto library via iTunes, you'll get an error reading "iTunes cannot sync photos to (whatever device you're using) because of a problem on your computer. An unknown error occurred (-50)".When using iPhoto Library Manager to try to look at an affected library's contents, you'll get an error message reading "The album data file for this library is malformed. Encountered unknown ampersand-escape sequence at line X".CauseThe root cause of this problem is triggered by the following setup:You've created a custom slideshow in your iPhoto libraryYou have used the "Music" button in iPhoto to assign a track from iTunes to play while the slideshow is being displayedThe track you chose has an ampersand (&) character anywhere in the name of the song, the song's artist name, or the song's album name. It's actually the path to the song that's relevant, but since iTunes organizes your music into subfolders based on these three fields, an ampersand existing in any one of them will result in the file's path having an ampersand in it. An example is illustrated below, where a song by "Rob Thomas & Santana" is selected as the music for a slideshowSolutionThere are actually a couple different ways to work around this problem. I'll list them here in order from simplest to most complicated.Delete the slideshow. Simple, but effective. But on the other hand, you lose your slideshow!Turn off music for the slideshow. Uncheck the "Play music during slideshow" checkbox and then click the "Apply" button to save your changes. But what if you still want to have music during your slideshow...?Choose a different song. Select a different song, one where no ampersand character occurs in either the song name, artist, or album title, then click "Apply". But what if you really really want that specific song you spent hours and hours choosing from your vast music collection to find the perfect one?Remove all the ampersands. The only way to keep using the same song will be to remove any offending ampersands that occur in the path to the song file. For this, you'll have to open up iTunes, find the song in question, and change the name, album, and/or artist to remove any ampersand characters in those fields. After you've done so, you'll also need to go back into iPhoto and re-choose the song in the slideshow music settings, to make sure iPhoto is updated to point to the song's new location.One additional source of ampersands is if your entire media folder is located inside a folder or drive with an ampersand in the name. For example, if you store your iTunes media folder on an external hard drive and have named the drive "Music & Video", then this will cause all your songs to have an ampersand character in their path. If this is the case, then you'll need to rename the hard drive or folder to remove the ampersand.Once you've done that, if you quit iPhoto, open up iTunes, and try syncing your device again, you should now be able to successfully sync your photos. If you still get an error, double check and make sure that the changes you made in iPhoto have "stuck" (click that "Apply" button!), and if you have multiple slideshows, that you've checked all of them for potential troublemaking music settings.