brunolojor / jbrout

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

Crash when null byte in comment #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import or refresh folder containning problems file. 

What is the expected output? What do you see instead?
Just adding or refreshing folder.

But I receive error and interapting of importing process.

Traceback (most recent call last):
  File "./jbrout.py", line 1480, in on_menu_refresh
    self.on_drop_folders_from_os(model,[path])
  File "./jbrout.py", line 1575, in on_drop_folders_from_os
    for nb in iterator:
  File "/home/kefiiir/soft/jbrout/jbrout/db.py", line 128, in add
    self.__addPhoto( file ,tags,filesInBasket)
  File "/home/kefiiir/soft/jbrout/jbrout/db.py", line 191, in __addPhoto
    importedTags=node.updateInfo( iii )
  File "/home/kefiiir/soft/jbrout/jbrout/db.py", line 899, in updateInfo
    nodeComment.text = pc.comment
  File "etree.pyx", line 741, in etree._Element.text.__set__
  File "apihelpers.pxi", line 344, in etree._setNodeText
  File "apihelpers.pxi", line 648, in etree._utf8
AssertionError: All strings must be XML compatible, either Unicode or ASCII

What version of the product are you using? On what operating system?
revision 186
Gentoo linux

Please provide any additional information below.

I think filename must be showed in debug message
And refresh mustn´t stop.

Problematic file is attached

Original issue reported on code.google.com by Oleg.Bla...@gmail.com on 6 Mar 2009 at 8:22

Attachments:

GoogleCodeExporter commented 9 years ago
when I open this file in geeqie it shows a lot of warning messages like this:

Caught Exiv2 exception 'Invalid key `fShutterSpeed''
Caught Exiv2 exception 'Invalid key `fISOSpeedRating''
Caught Exiv2 exception 'Invalid key `fFocalLength''
Caught Exiv2 exception 'Invalid key `fExposureBias''
Caught Exiv2 exception 'Invalid key `fCamera''
Caught Exiv2 exception 'Invalid key `fFlash''
Caught Exiv2 exception 'Invalid key `fAperture''
Caught Exiv2 exception 'Invalid key `fShutterSpeed''
Caught Exiv2 exception 'Invalid key `fISOSpeedRating''
Caught Exiv2 exception 'Invalid key `fFocalLength''
Caught Exiv2 exception 'Invalid key `fExposureBias''
Caught Exiv2 exception 'Invalid key `fCamera''
Caught Exiv2 exception 'Invalid key `fFlash''
Caught Exiv2 exception 'Invalid key `fAperture''
Caught Exiv2 exception 'Invalid key `fShutterSpeed''
Caught Exiv2 exception 'Invalid key `fISOSpeedRating''
Caught Exiv2 exception 'Invalid key `fFocalLength''
 Exiv2 exception 'Invalid key `fExposureBias''
Caught Exiv2 exception 'Invalid key `fCamera''
Caught Exiv2 exception 'Invalid key `fFlash''

Original comment by Oleg.Bla...@gmail.com on 6 Mar 2009 at 8:24

GoogleCodeExporter commented 9 years ago
issue confirmed : same error with that file. issue is that exif data is missing.

Original comment by tbenita on 12 Jul 2009 at 9:28

GoogleCodeExporter commented 9 years ago
actually Photoshop adds a null byte in its comment, which causes the issue

Original comment by tbenita on 12 Jul 2009 at 9:53

GoogleCodeExporter commented 9 years ago

Original comment by tbenita on 12 Jul 2009 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by tbenita on 12 Jul 2009 at 9:59