problems running iphotoexport under Mac os X 10.4.11 Tiger

7 views
Skip to first unread message

André

unread,
Oct 18, 2009, 10:50:06 AM10/18/09
to iphotoexport-users
Tiger's installation of Python seems to lack a number of modules
required by iphoexport. In post
http://groups.google.com/group/iphotoexport-users/browse_thread/thread/9036fe4a67874e8c/c9411578b966d58c#c9411578b966d58c
problems caused by the lack of the module sqlite3 are discussed. This
is no longer an issue with iphotoexport 1.5.

However, Tiger also lacks the subprocess module. Attempting to run
iphotoexport 1.5 generates this error:

afs25:~/Desktop/iphotoexport-1.5 afs25$ ./iphotoexport.py --help
Traceback (most recent call last):
File "./iphotoexport.py", line 26, in ?
import appledata.iphotodata as iphotodata
File "/Users/afs25/Desktop/iphotoexport-1.5/appledata/
iphotodata.py", line 53, in ?
import tilutil.systemutils as sysutils
File "/Users/afs25/Desktop/iphotoexport-1.5/tilutil/systemutils.py",
line 23, in ?
import subprocess
ImportError: No module named subprocess

I tried to solve this by installing Python 3.1.1, using the disk image
available in http://www.python.org/download/releases/3.1.1/

This seems to have solved the problem above, but yet another error
occurred:

afs25:~/Desktop/iphotoexport-1.5 afs25$ python
Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

afs25:~/Desktop/iphotoexport-1.5 afs25$ ./iphotoexport.py --help
File "./iphotoexport.py", line 69
result = u""
^
SyntaxError: invalid syntax

I'm not sure what causes this error and where to go from here. Any
help would be greatly appreciated.
Thanks in advance,
Andre

Tilman Sporkert

unread,
Oct 18, 2009, 11:53:56 AM10/18/09
to iphotoexp...@googlegroups.com
Python 3 unfortunately made some changes to the Python language that make it not compatible with scripts written for Python 2. From the Python download page:
  If you don't know which version to use, start with Python 2.6.3; more existing third party software is compatible with Python 2 than Python 3 right now.
The subprocess module was added to Python in version 2.4, and iphotoexport should work with Python 2.4 or newer (but that does not include Python 3). Maybe you could give it a try with Python 2.6.3. 

Thanks for debugging this. Let me know how it works out, so I can add some notes to the iphotoexport pages about running iphotoexport on Tiger.

Tilman
--
Tilman Sporkert (til...@sporkert.com)

André

unread,
Oct 18, 2009, 12:49:56 PM10/18/09
to iphotoexport-users
I see. I had overlooked that warning from the Python download page.
After installing Python 2.6.3 (using this mac disk image:
http://www.python.org/ftp/python/2.6.3/python-2.6.3-macosx.dmg ;
ticking all boxes during installation), iphotoexport 1.5 now works
under Tiger:

afs25:~/Desktop/iphotoexport-1.5 afs25$ python
Python 2.6.3 (r263:75184, Oct 2 2009, 07:56:03)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

afs25:~/Desktop/iphotoexport-1.5 afs25$ ./iphotoexport.py --help
Usage: iphotoexport.py [options] <iPhoto Library Location>
<exportFolder>

Exports images and movies from an iPhoto library into a folder.

Arguments:
<iPhoto Library Location>
iPhoto Library package location. Typically "~/Pictures/iPhoto
Library".

<exportFolder>
Folder to export the selected iPhoto images and movies into. Any
files
found in this folder that are not part of the export set will be
deleted, and files that match will be overwritten if the iPhoto
version
of the file is different.


Options:
-h, --help show this help message and exit
-a ALBUMS, --albums=ALBUMS
Export matching regular albums. The
argument is
a regular expression. Use -a . to export all
regular
albums.
-d, --delete Delete obsolete files that are no longer in
your
iPhoto library.
-e EVENTS, --events=EVENTS
Export matching events. The argument is
a
regular expression. Use -e . to export all
events.
-f, --faces Process faces information
--folderhints Scan event and album descriptions for folder
hints.
-k, --iptc Check the IPTC data of all new or updated
files.
Checks for keywords and descriptions.
Requires
the program "exiftool" (see
http://www.sno.phy.queensu.ca/~phil/exiftool/).
-K, --iptcall Check the IPTC data of all files. Checks for
keywords and descriptions. Requires the
program
"exiftool" (see
http://www.sno.phy.queensu.ca/~phil/exiftool/).
-l, --link Use links instead of copying files. Use with
care, as
changes made to the exported files will
affect the
image that is stored in the iPhoto
library.
-n NAMETEMPLATE, --nametemplate=NAMETEMPLATE
Template for naming image files. Default:
"${caption}".
-o, --originals Export original files into Originals.
--picasa Store originals in .picasaoriginals, check
folder
descriptions
--pictures Export pictures only (no movies).
--places Process places information
--size=SIZE Resize images to not exceed this width or
height.
Use widthxheight format, like 640x480.
Requires
ImageMagick tool.
-s SMARTS, --smarts=SMARTS
Export matching smart albums. The
argument is a
regular expression. Use -s . to export all
smart
albums.
-u, --update Update existing files.
-x EXCLUDE, --exclude=EXCLUDE
Don't export matching albums or events. The
pattern is
a regular expression.
--excludefolders=EXCLUDEFOLDERS
List of folders to ignore in the export folder
(comma
separated).
afs25:~/Desktop/iphotoexport-1.5 afs25$

Thank you very much for support and for developing the program.
Cheers,
Andre
Reply all
Reply to author
Forward
0 new messages