Would like to use this but does not understand #8

Closed
jaron-lee opened this Issue Jan 2, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@jaron-lee

I would like to use this script to export my iPhoto library. However, I got stuck when the instructions read:

python exportiphoto.py [options]

Being new to this I assume this goes into Terminal? Correct me if I'm wrong.
I tried putting:

python /Users/myusername/Desktop/exportiphoto.py -d /Users/myusername/Pictures/iPhoto Library/ /Users/myusername/Pictures/Photo Export/

but the error returned was:

exportiphoto.py: error: Please specify an iPhoto library and a destination.

I've downloaded the Python package (version 2.7) as well as the python script, running Mac OSX 10.6. If someone would be so kind as to walk me through the whole process step by step it would be very much appreciated, as I have had no programming experience whatsoever.

@BMorearty

This comment has been minimized.

Show comment Hide comment
@BMorearty

BMorearty Jan 2, 2011

Owner

Mac OS requires you to put a backslash before a space if the space is part of a filename. Try this:

python /Users/myusername/Desktop/exportiphoto.py -d /Users/myusername/Pictures/iPhoto\ Library/ /Users/myusername/Pictures/Photo\ Export/

Owner

BMorearty commented Jan 2, 2011

Mac OS requires you to put a backslash before a space if the space is part of a filename. Try this:

python /Users/myusername/Desktop/exportiphoto.py -d /Users/myusername/Pictures/iPhoto\ Library/ /Users/myusername/Pictures/Photo\ Export/

@jaron-lee

This comment has been minimized.

Show comment Hide comment
@jaron-lee

jaron-lee Jan 3, 2011

Hi, thanks for responding. I ran it again, and this time the error returned was:

  • Parsing iPhoto Library data... Traceback (most recent call last):
    File "/Users/myusername/Desktop/exportiphoto.py", line 394, in
    library = iPhotoLibrary(args[0], use_album=options.albums, quiet=options.quiet)
    File "/Users/myusername/Desktop/exportiphoto.py", line 43, in init
    self.parseAlbumData(albumDataXml)
    File "/Users/myusername/Desktop/exportiphoto.py", line 107, in parseAlbumData
    doc.expandNode(node)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/pulldom.py", line 253, in expandNode
    event = self.getEvent()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/pulldom.py", line 265, in getEvent
    self.parser.feed(buf)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/handler.py", line 38, in fatalError
    raise exception
    xml.sax._exceptions.SAXParseException: :52665:8: not well-formed (invalid token)

I'm running iPhoto 8.1.2. I tried rebuilding the library but that seemed to have no effect.

Hi, thanks for responding. I ran it again, and this time the error returned was:

  • Parsing iPhoto Library data... Traceback (most recent call last):
    File "/Users/myusername/Desktop/exportiphoto.py", line 394, in
    library = iPhotoLibrary(args[0], use_album=options.albums, quiet=options.quiet)
    File "/Users/myusername/Desktop/exportiphoto.py", line 43, in init
    self.parseAlbumData(albumDataXml)
    File "/Users/myusername/Desktop/exportiphoto.py", line 107, in parseAlbumData
    doc.expandNode(node)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/pulldom.py", line 253, in expandNode
    event = self.getEvent()
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/pulldom.py", line 265, in getEvent
    self.parser.feed(buf)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/handler.py", line 38, in fatalError
    raise exception
    xml.sax._exceptions.SAXParseException: :52665:8: not well-formed (invalid token)

I'm running iPhoto 8.1.2. I tried rebuilding the library but that seemed to have no effect.

@BMorearty

This comment has been minimized.

Show comment Hide comment
@BMorearty

BMorearty Jan 3, 2011

Owner

Hmm, that's frustrating. It seems to be having trouble parsing the XML file. I don't know what would be causing that. I'm using the same version of iPhoto as you.

I was going to ask if it was possible that you copied & pasted the command-line from above but forgot to change "username" back to your real username...but then I tried it and you would have gotten a different error message.

Sorry, I don't know what to suggest.

Owner

BMorearty commented Jan 3, 2011

Hmm, that's frustrating. It seems to be having trouble parsing the XML file. I don't know what would be causing that. I'm using the same version of iPhoto as you.

I was going to ask if it was possible that you copied & pasted the command-line from above but forgot to change "username" back to your real username...but then I tried it and you would have gotten a different error message.

Sorry, I don't know what to suggest.

@jaron-lee

This comment has been minimized.

Show comment Hide comment
@jaron-lee

jaron-lee Jan 3, 2011

Well, that's ok. Thanks very much for your time. I'll have to manually copy out every event, but so be it.

Well, that's ok. Thanks very much for your time. I'll have to manually copy out every event, but so be it.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment