peircej / jbrout

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

jBrout does not handle Exif.Image.Orientation values outside of defined values #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. When importing attached image I get backtrace

What is the expected output? What do you see instead?
Photo has incorrect exif/iptc tags, can't be imported :
[u'/home/matej/Obr\xe1zky/import/P1020109.JPG']
***WARNING*** : YOU ARE USING pyexiv2>0.2 (jbrout doesn't support very well this
 new version ! not fully tested ! some things are not implemented !!!)
Traceback (most recent call last):
  File "/usr/share/jbrout/jbrout.py", line 1586, in on_menu_refresh
    self.on_drop_folders_from_os(model,[path])
  File "/usr/share/jbrout/jbrout.py", line 1686, in on_drop_folders_from_os
    for nb in iterator:
  File "/usr/share/jbrout/jbrout/db.py", line 161, in add
    self.__addPhoto( nodeDir,file ,tags,filesInBasket)
  File "/usr/share/jbrout/jbrout/db.py", line 199, in __addPhoto
    raise Exception(err+"\nPhoto has incorrect exif/iptc tags, can't be imported
 :\n"+str([file,]))
Exception: Traceback (most recent call last):
  File "/usr/share/jbrout/jbrout/db.py", line 183, in __addPhoto
    needAutoRotation=DBPhotos.autorotAtImport,
  File "/usr/share/jbrout/jbrout/tools.py", line 230, in __init__
    self.transform("auto")
  File "/usr/share/jbrout/jbrout/tools.py", line 555, in transform
    sens = autoTrans[int(self.__info['Exif.Image.Orientation'])][0]
KeyError: 0

Attached patch fixes the problem.

Original issue reported on code.google.com by matej.c...@gmail.com on 4 Dec 2010 at 8:44

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by r...@wallace.gen.nz on 8 Jan 2011 at 1:24

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r324.

Original comment by r...@wallace.gen.nz on 8 Jan 2011 at 1:30