Fatal error du to Umlauts?

3 views
Skip to first unread message

Stephan Kellner

unread,
May 2, 2010, 7:55:44 PM5/2/10
to iphotoexport-users
Hello,
I am trying this nice script out to be free of iPhoto (its scaring me
more and more, this not-having-the-keywords-within-the-photos-and-in-
case-of-a-database-corruption-everything-will-be-lost thingy).
So I am all excited!
However, it seems as if iphotoexport stops when it hits an Umlaut in
the description (such as ä, ö, etc.). Is there a way to prevent this?
New file: /Users/stephan/Pictures/Album/2005/2005 Herräng/95260024.jpg
(copy)
macostools.copy() on this system, reverting to shutil.copy2()
Traceback (most recent call last):
File "./iphotoexport.py", line 792, in <module>
main()
File "./iphotoexport.py", line 785, in main
export_iphoto(data, options.export, options.exclude,
exclude_folders, options)
File "./iphotoexport.py", line 669, in export_iphoto
album.generate_files(options)
File "./iphotoexport.py", line 641, in generate_files
self.named_folders[key].generate_files(options)
File "./iphotoexport.py", line 486, in generate_files
self.files[f].generate(options)
File "./iphotoexport.py", line 257, in generate
self.check_iptc_data(self.export_file, options)
File "./iphotoexport.py", line 308, in check_iptc_data
gps) = exiftool.get_iptc_data(export_file)
File "/Users/stephan/Pictures/_iphotoexport-1.6.1/tilutil/
exiftool.py", line 106, in get_iptc_data
xml_element.firstChild.nodeValue, su.fsenc(image_file))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
44: ordinal not in range(128)

Thanks in advance for any help!

Stephan

--
You received this message because you are subscribed to the Google Groups "iphotoexport-users" group.
To post to this group, send email to iphotoexp...@googlegroups.com.
To unsubscribe from this group, send email to iphotoexport-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphotoexport-users?hl=en.

Tilman

unread,
May 2, 2010, 9:16:50 PM5/2/10
to iphotoexport-users
Stephan,
the error above seems to come from a problem with a date in the
meta data of the image it tried to export, not the Umlaut. I do have
Umlaut characters in some of my images as well, and they export just
fine. I wonder if exiftool (which I use to read meta data in images)
uses the current locale to format date output, and maybe formats the
date in German date format. It would be helpful if you could run the
command below over one of your images, and send me the output:

exiftool -X <pathToImageFileHere> | grep DateTimeOriginal

You can pick any image you have handy - I just want to double check
the date output format of exiftool on your machine. The output should
look like
<ExifIFD:DateTimeOriginal>2010:02:07 12:27:04</
ExifIFD:DateTimeOriginal>

Tilman

On May 2, 4:55 pm, Stephan Kellner <stephankell...@googlemail.com>
wrote:

Stephan Kellner

unread,
May 3, 2010, 8:49:33 PM5/3/10
to iphotoexport-users
Hello Tilman,

I ran the command:

exiftool -X ~/Pictures/_iphotoexport-1.6.1/95260025.JPG | grep
DateTimeOriginal
<ExifIFD:DateTimeOriginal> </
ExifIFD:DateTimeOriginal>

So it seems as if the photo header might be corrupted, no?
That might be the case, I got those photos via dubious means (ie the
Internet, sharing site).

A photo that works gets the right output:
exiftool -X ~/Pictures/_iphotoexport-1.6.1/PhotosAssia084.jpg | grep
DateTimeOriginal
<ExifIFD:DateTimeOriginal>2005:07:19 04:56:57</
ExifIFD:DateTimeOriginal>

Thanks so much!

Stephan

Tilman

unread,
May 3, 2010, 9:01:49 PM5/3/10
to iphotoexport-users
Thanks for the info. The code actually allows for missing or badly
formatted dates, but apparently it ran into a problem with the umlaut
when it tried to report the bad date for your image. I need to check
that out, and I'll try to come up with a workaround later today. I
just wanted to make sure we weren't dealing with a date formatting
problem here.

Tilman

On May 3, 5:49 pm, Stephan Kellner <stephankell...@googlemail.com>

Tilman

unread,
May 4, 2010, 3:00:26 AM5/4/10
to iphotoexport-users
Please try iphotoexport-1.6.3, which I just uploaded. It should print
a warning message about the missing date in your image, but then
proceed without other problems. You can also set an image date from
within iPhoto. Make sure the "Modify original file" option is checked.

Tilman

Stephan Kellner

unread,
May 4, 2010, 9:22:47 PM5/4/10
to iphotoexport-users
Hello Tilman,

Tried the new version, but it still quits.

New file: /Users/stephan/Pictures/Album/2005/2005 Herräng/95270001.jpg
(copy)
macostools.copy() on this system, reverting to shutil.copy2()
Traceback (most recent call last):
File "./iphotoexport.py", line 787, in <module>
main()
File "./iphotoexport.py", line 780, in main
export_iphoto(data, options.export, options.exclude,
exclude_folders, options)
File "./iphotoexport.py", line 664, in export_iphoto
album.generate_files(options)
File "./iphotoexport.py", line 636, in generate_files
self.named_folders[ndir].generate_files(options)
File "./iphotoexport.py", line 486, in generate_files
self.files[f].generate(options)
File "./iphotoexport.py", line 257, in generate
self.check_iptc_data(self.export_file, options)
File "./iphotoexport.py", line 308, in check_iptc_data
gps) = exiftool.get_iptc_data(export_file)
File "/Users/stephan/Pictures/_iphotoexport-1.6.1/tilutil/
exiftool.py", line 106, in get_iptc_data
xml_element.firstChild.nodeValue, su.fsenc(image_file))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
44: ordinal not in range(128)

I ran thru the rest of my albums without a problem, though.
Will try changing the date in iPhoto tomorrow.

Thanks so much,
Stephan

Tilman Sporkert

unread,
May 4, 2010, 9:35:50 PM5/4/10
to iphotoexp...@googlegroups.com
Somehow you are not running the right version. The patched version is 1.6.3, available here. The error stack below is from version 1.6.1, with the old code:

File "/Users/stephan/Pictures/_iphotoexport-1.6.1/tilutil/  <-- 1.6.1 instead of 1.6.3

exiftool.py", line 106, in get_iptc_data
   xml_element.firstChild.nodeValue, su.fsenc(image_file))  <-- old code

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
44: ordinal not in range(128)

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

Stephan Kellner

unread,
May 5, 2010, 6:49:51 PM5/5/10
to iphotoexport-users
Hello Tilman,

I tried again (replaced the entire directory again) and now it's
working...
it's just continuing and not quitting, as you said.
Thanks !

Stephan


On May 4, 9:35 pm, Tilman Sporkert <tspork...@gmail.com> wrote:
> Somehow you are not running the right version. The patched version is 1.6.3,
> available here.<http://iphotoexport.googlecode.com/files/iphotoexport-1.6.3.zip>
> The
> error stack below is from version 1.6.1, with the old code:
>
> File "/Users/stephan/Pictures/_iphotoexport-*1.6.1*/tilutil/  <-- 1.6.1
> instead of 1.6.3
> exiftool.py", line 106, in get_iptc_data
>    xml_element.firstChild.nodeValue, *su.fsenc(image_file)*)  <-- old code
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 44: ordinal not in range(128)
>
> Tilman
>
> On Tue, May 4, 2010 at 6:22 PM, Stephan Kellner <
>
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
> > > > > > > For more options, visit this group athttp://
> > groups.google.com/group/iphotoexport-users?hl=en.
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google
> > Groups "iphotoexport-users" group.
> > > > > > To post to this group, send email to
> > iphotoexp...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
> > > > > > For more options, visit this group athttp://
> > groups.google.com/group/iphotoexport-users?hl=en.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups "iphotoexport-users" group.
> > > > > To post to this group, send email to
> > iphotoexp...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
> > > > > For more options, visit this group athttp://
> > groups.google.com/group/iphotoexport-users?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups "iphotoexport-users" group.
> > > > To post to this group, send email to
> > iphotoexp...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/iphotoexport-users?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "iphotoexport-users" group.
> > > To post to this group, send email to iphotoexp...@googlegroups.com
> > .
> > > To unsubscribe from this group, send email to
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
> > > For more options, visit this group athttp://
> > groups.google.com/group/iphotoexport-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "iphotoexport-users" group.
> > To post to this group, send email to iphotoexp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > iphotoexport-us...@googlegroups.com<iphotoexport-users%2Bunsubs cr...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages