peircej / jbrout

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

file can't be imported #153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. import dir with photos
2.
3.

What is the expected output? What do you see instead?

Traceback (most recent call last):
   File "./jbrout.py", line 2556, in on_btn_addFolder_clicked
    self.on_drop_folders_from_os(self.treeviewdb.get_model(),[folder])
   File "./jbrout.py", line 1640, in on_drop_folders_from_os
    for nb in iterator:
   File "/home/kefiiir/soft/jbrout/jbrout/db.py", line 161, in add
    self.__addPhoto( nodeDir,file ,tags,filesInBasket)
   File "/home/kefiiir/soft/jbrout/jbrout/db.py", line 194, 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 "/home/kefiiir/soft/jbrout/jbrout/db.py", line 183, in __addPhoto
    needAutoRotation=DBPhotos.autorotAtImport,
  File "/home/kefiiir/soft/jbrout/jbrout/tools.py", line 229, in __init__
    self.transform("auto")
  File "/home/kefiiir/soft/jbrout/jbrout/tools.py", line 528, in transform
    sens = autoTrans[int(self.__info['Exif.Image.Orientation'])][0]
TypeError: int() argument must be a string or a number, not 'tuple'

Photo has incorrect exif/iptc tags, can't be imported :
[u'/home/kefiiir/doc/photo/00_thailand/2009-09-25-ancha_bd/20090925-211318-kef-D
70-8572.jpg']

What version of the product are you using? On what operating system?
SVN r 300
Gentoo Linux

Please provide any additional information below.
attached file causes this error 

Original issue reported on code.google.com by Oleg.Bla...@gmail.com on 30 Jun 2010 at 8:00

Attachments:

GoogleCodeExporter commented 8 years ago
It seems like I have the same problem. Trace is from importing from a directory 
with only one image in it. "exif p20100619_165125.jpg" can read the exif data 
of this image without a problem. Output from jbrout:

The psyco module does not seem to be installed. It is not necessary, however it 
can speed up performance.
/opt/jbrout/plugins/multiexport/libs/picasaweb/gdata/tlslite/utils/cryptomath.py
:9: DeprecationWarning: the sha module is deprecated; use the hashlib module 
instead
  import sha
/opt/jbrout/jbrout.py:923: DeprecationWarning: Use the new widget gtk.Tooltip
  self.tooltips = gtk.Tooltips()
/opt/jbrout/jbrout.py:1175: DeprecationWarning: integer argument expected, got 
float
  self.main_widget.move(x,y)
***WARNING*** : YOU ARE USING pyexiv2>0.2 (jbrout doesn't support very well 
this new version ! not fully tested ! some things are not implemented !!!)
***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 "/opt/jbrout/jbrout.py", line 1540, in on_menu_refresh
    self.on_drop_folders_from_os(model,[path])
  File "/opt/jbrout/jbrout.py", line 1640, in on_drop_folders_from_os
    for nb in iterator:
  File "/opt/jbrout/jbrout/db.py", line 161, in add
    self.__addPhoto( nodeDir,file ,tags,filesInBasket)
  File "/opt/jbrout/jbrout/db.py", line 194, 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 "/opt/jbrout/jbrout/db.py", line 183, in __addPhoto
    needAutoRotation=DBPhotos.autorotAtImport,
  File "/opt/jbrout/jbrout/tools.py", line 260, in __init__
    self.__refresh()
  File "/opt/jbrout/jbrout/tools.py", line 302, in __refresh
    self.__comment = decode(self.__info.getComment())
  File "/opt/jbrout/jbrout/pyexiv.py", line 61, in getComment
    return self._md.comment
AttributeError: 'ImageMetadata' object has no attribute 'comment'

Photo has incorrect exif/iptc tags, can't be imported :
[u'/data/Fotos/tmp/p20100619_165125.jpg']

System:
jbrout SVN r 304
openSuSE 11.3 / 2.6.34 (x86)
python-pyexiv2-0.2.0-2.2
exiftool-8.15-1.3.i586
libexif-0.6.19-5.2.i586
exif-0.6.19-3.2.i586

Original comment by andrhoel...@gmail.com on 18 Jul 2010 at 11:30

GoogleCodeExporter commented 8 years ago

Original comment by andrhoel...@gmail.com on 18 Jul 2010 at 11:34

Attachments:

GoogleCodeExporter commented 8 years ago
problem disappeared after update of python-pyexiv2:
python-pyexiv2-0.2.2-0.pm.2.1.i586

Andreas

Original comment by andrhoel...@gmail.com on 8 Aug 2010 at 10:53

GoogleCodeExporter commented 8 years ago
thanks

Original comment by manat...@gmail.com on 11 Oct 2010 at 6:27