Error: File "./iphotoexport.py", line 27, in ? import appledata.iphotodata as iphotodata

9 views
Skip to first unread message

André

unread,
Oct 16, 2009, 6:33:17 AM10/16/09
to iphotoexport-users
Hi,

I have just downloaded versions 1.3.1 and 1.4, but failed to run the
program. Below is the error I get:

afs25:~/Desktop/iphotoexport-1.4 afs25$ ./iphotoexport.py --help
Traceback (most recent call last):
File "./iphotoexport.py", line 27, in ?
import appledata.iphotodata as iphotodata
File "/Users/afs25/Desktop/iphotoexport-1.4/appledata/
iphotodata.py", line 43, in ?
import sqlite3
ImportError: No module named sqlite3
afs25:~/Desktop/iphotoexport-1.4 afs25$

I am attempting to run the program in Mac OS X 10.4.11. The same error
occurs when I try to run the program without the option --help.

Thanks in advance.

Tilman Sporkert

unread,
Oct 16, 2009, 11:11:23 AM10/16/09
to iphotoexp...@googlegroups.com
Hmmm... it looks like the Python installation on your machine does not have the Sqlite package. You are running on Tiger. I wonder if the default Python installation on Tiger lacks the Sqlite package. Unfortunately, I don't have a Tiger machine to test with.

There are two options here: If you are familiar with Python, you could install the Sqlite package on your machine. Or I could look into making the loading of the Sqlite package in iphotoexport optional. You wouldn't be able to export face tags or places without it. What version of iPhoto are you using?

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

André

unread,
Oct 16, 2009, 12:51:52 PM10/16/09
to iphotoexport-users
Thank you for your prompt reply and for developing the program.

> Hmmm... it looks like the Python installation on your machine does not have
> the Sqlite package. You are running on Tiger. I wonder if the default Python
> installation on Tiger lacks the Sqlite package. Unfortunately, I don't have
> a Tiger machine to test with.

It seems that Tiger comes with Sqlite pre-installed (e.g. see
http://my.safaribooksonline.com/0596009127/macxtigerunix-CHP-18-SECT-1)
and, indeed, my system has SQLite version 3.1.3:

afs25:/usr/lib afs25$ sqlite3
SQLite version 3.1.3
Enter ".help" for instructions
sqlite>

> There are two options here: If you are familiar with Python, you could
> install the Sqlite package on your machine. Or I could look into making the
> loading of the Sqlite package in iphotoexport optional. You wouldn't be able
> to export face tags or places without it. What version of iPhoto are you
> using?

I'm not familiar with Python and am using iPhoto version 6.0.6 (322).

Cheers,
Andre

André

unread,
Oct 16, 2009, 1:35:07 PM10/16/09
to iphotoexport-users
After reading a bit more, I understand that python is looking for a
file sqlite3.py, not the binary for sqlite3. Is that right? My system
does not seem to have the .py file:

afs25:~ afs25$ sudo find / -name sqlite3* -type f -print
Password:
find: /dev/fd/3: Bad file descriptor
find: /dev/fd/4: Not a directory
find: /dev/fd/5: Not a directory
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/sqlite3.h
/sw/fink/10.4/unstable/main/finkinfo/database/sqlite3.info
/sw/fink/10.4/unstable/main/finkinfo/database/sqlite3.patch
/usr/bin/sqlite3
/usr/include/sqlite3.h
/usr/share/man/man1/sqlite3.1
afs25:~ afs25$


I don't need to export faces of places (I need only keywords and
comments) so, if I delete line 43 of iphotodata.py ( import sqlite3 ),
then the program should work, luckily without undesirable side-
effects?

Alternatively, could I install the missing module?

Thanks

Tilman Sporkert

unread,
Oct 16, 2009, 2:37:45 PM10/16/09
to iphotoexp...@googlegroups.com
Yes, it's the Python sqlite package that is required. And since you are using a version of iPhoto that doesn't support faces, iphotoexport will never try to execute the sqlite code. So yes, the easiest way to move forward is to delete the line with the import statement in iphotodata.py.

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

Tilman

unread,
Oct 18, 2009, 12:37:52 AM10/18/09
to iphotoexport-users
I've uploaded iphotoexport-1.5. It should treat sqlite3 as an optional
package, and not fail unless you try to export places or face tags.

Tilman


On Oct 16, 11:37 am, Tilman Sporkert <tspork...@gmail.com> wrote:
> Yes, it's the Python sqlite package that is required. And since you are
> using a version of iPhoto that doesn't support faces, iphotoexport will
> never try to execute the sqlite code. So yes, the easiest way to move
> forward is to delete the line with the import statement in iphotodata.py.
> Tilman
>
Reply all
Reply to author
Forward
0 new messages