lachaize / jbrout

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

Suggestion: ignore unxpected errors while importing #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just fixed locally a lot of errors (bad encoding of file/path name, bad 
characters in comments, 
wrong image type, ...) that always stop the importing. But there is always 
another problem 
with one of my 10.000 images i wanted to import.

e.g. this one shouldnt stop the import process but exclude the file from the db:
IOError: /home/lomex/filme/poster/2009-10-13/photo_10.jpg: The file contains 
data of an 
unknown image type

I suggest "try-excepting" the whole import procedure of one file and thus not 
stopping to 
import for each error.

( It really sucks having imported 8.000 of 10.000 images and then having to 
redo all because 
some files are corrupt / contain bad encodiings, ... )

Original issue reported on code.google.com by lome...@googlemail.com on 13 Oct 2009 at 4:19

GoogleCodeExporter commented 9 years ago
Now this one stopped the importing:

Traceback (most recent call last):
   File "./jbrout.py", line 1521, in on_menu_refresh
    self.on_drop_folders_from_os(model,[path])
   File "./jbrout.py", line 1616, in on_drop_folders_from_os
    for nb in iterator:
   File "/home/lomex/filme/jbrout/jbrout/db.py", line 132, in add
    self.__addPhoto( file ,tags,filesInBasket)
   File "/home/lomex/filme/jbrout/jbrout/db.py", line 192, 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/lomex/filme/jbrout/jbrout/db.py", line 181, in __addPhoto
    needAutoRotation=DBPhotos.autorotAtImport,
  File "/home/lomex/jb/jbrout/jbrout/tools.py", line 223, in __init__
    self.__info.writeMetadata()
IOError: Setting Exif metadata in GIF images is not supported

If its not supported, why then do we care for it?
Just ignoring it or printing a warning would be enough...

Original comment by lome...@googlemail.com on 13 Oct 2009 at 4:24

GoogleCodeExporter commented 9 years ago
Would you have an archive with all problematic pictures ? 

Original comment by tbenita on 1 Nov 2009 at 12:31

GoogleCodeExporter commented 9 years ago
seems not so easy to find them, i attached the most simple two including the 
traceback i got. tested on 
revision 270 fresh from svn.

Original comment by lome...@googlemail.com on 1 Nov 2009 at 4:40

Attachments:

GoogleCodeExporter commented 9 years ago
As of r342 files with issues are skipped and listed at the end of the import

Original comment by r...@wallace.gen.nz on 5 Oct 2012 at 7:11