gottagetit / phoshare

Automatically exported from code.google.com/p/phoshare
Other
0 stars 0 forks source link

Phoshare 1.5.1 can't open my iPhoto library #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Just attempt to open Phoshare.
2.
3.

What is the expected output? What do you see instead?

Error: <unknown>:82732:11: not well-formed (invalid token)

Traceback (most recent call last):
  File "/Users/rick/Downloads/Phoshare-1.5.1.app/Contents/Resources/lib/python2.7/phoshare/phoshare_ui.py", line 902, in export_thread
  File "/Users/rick/Downloads/Phoshare-1.5.1.app/Contents/Resources/lib/python2.7/appledata/iphotodata.py", line 820, in get_iphoto_data
  File "/Users/rick/Downloads/Phoshare-1.5.1.app/Contents/Resources/lib/python2.7/appledata/applexml.py", line 160, in read_applexml_fixed
  File "/Users/rick/Downloads/Phoshare-1.5.1.app/Contents/Resources/lib/python2.7/appledata/applexml.py", line 168, in read_applexml_string
  File "xml/sax/__init__.pyc", line 49, in parseString
  File "xml/sax/expatreader.pyc", line 107, in parse
  File "xml/sax/xmlreader.pyc", line 123, in parse
  File "xml/sax/expatreader.pyc", line 211, in feed
  File "xml/sax/handler.pyc", line 38, in fatalError
SAXParseException: <unknown>:82732:11: not well-formed (invalid token)

What version of the product are you using? On what operating system?
Phoshare 1.5.1
iPhoto 9.4.1

Please provide any additional information below.

I did find some ampersands in my event names and removed them. No dice. The 
ampersands are properly escaped in Album2.xml. I noticed that there are some 
ampersands in captions. I don't know what else to do to get this to work.

Thanks
RB

Original issue reported on code.google.com by rhby...@gmail.com on 10 Oct 2012 at 2:26

GoogleCodeExporter commented 8 years ago
Mac OsX 10.8.2

Original comment by rhby...@gmail.com on 10 Oct 2012 at 2:27

GoogleCodeExporter commented 8 years ago
Did iPhoto update the AlbumData.xml file in your library folder after you 
upgraded to iPhoto 9.4.1? iPhoto 9.4 wrote badly formatted content into this 
file. iPhoto updates this file quite lazily now. One way to force it to update 
the file is to make a change to an image (e.g. change a title or description), 
and then quite iPhoto. It will rewrite the file while shutting down.

Original comment by tsporkert on 10 Oct 2012 at 5:23

GoogleCodeExporter commented 8 years ago
I did try that. It didn't work any better. PhoShare gave the exact same error 
message. I even tried PhoShare 1.50 and 1.47 with the same result. Any ideas?

Original comment by rhby...@gmail.com on 11 Oct 2012 at 12:33

GoogleCodeExporter commented 8 years ago
The problem is on the iPhoto side, not with Phoshare. It generates bad XML. If 
you are handy with looking at files, check the file AlbumData.xml in your 
iPhoto library folder, around line 82732 (line number pulled from the error 
message), for anything suspicious.  Most likely you will find a title or 
comment string for an image or event there. Then go into iPhoto, and re-enter 
the string without any special characters. 

Original comment by tsporkert on 11 Oct 2012 at 6:29

GoogleCodeExporter commented 8 years ago
I had seen that recommendation on another post, but I didn't have a way to get 
to line 82732. So I downloaded TextWrangler, opened the file and Command J to 
go to line 82732. It looked normal at first, but there was a leading space or 
special character in front of a string identifying a Faces album. I carefully 
retyped it in iPhoto and exited and PhoShare was able to read my iPhoto library.

Just to test, I put a leading space in the name of another Face album, but it 
didn't cause a problem. It must have been a special character that got in there 
my mistake.

Thanks for the help!

Original comment by rhby...@gmail.com on 11 Oct 2012 at 11:00

GoogleCodeExporter commented 8 years ago
Yes, I have seen a few times that iPhoto inserts an unprintable control 
character. I don't know how they get into iPhoto (and they shouldn't be there). 
But if they do get into the data, they should be escaped in the XML like "". 

Glad to hear you found the offending character.

Original comment by tsporkert on 11 Oct 2012 at 3:34