Attempting to add metadata to unsupported types

Bug #384315 reported by Nadia Alramli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Critical
Stani
phatch (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If you have the 'Save metadata' option selected in the execute dialog. You'll get lot's of warnings like this:

Warning 2:
Failed to save metadata to /path/to/file/phatch/Shiny.png:
pyexiv2: Setting Exif metadata in PNG images is not supported
Trying again by ignoring tags with following pattern:
Exif[.]Canon

I suggest pre-checking types before attempting to write metadata.

Nadia Alramli (nadiana)
Changed in phatch:
assignee: nobody → stani (stani)
importance: Undecided → Medium
Revision history for this message
Stani (stani) wrote :
Changed in phatch:
importance: Medium → Critical
status: New → Confirmed
Revision history for this message
Stani (stani) wrote :

Also Phatch should first check if there are eg Exif[.]Canon tags, otherwise it doesn't make sense.

Stani (stani)
Changed in phatch:
status: Confirmed → In Progress
Revision history for this message
Stani (stani) wrote :

Strangely enough exiv2 states it supports png, but I removed it from the list. This bug was a huge amount of work to fix it. And I am not quite sure if it will work well. Please test.

Revision history for this message
Stani (stani) wrote :

Please test if this is fixed.

Changed in phatch:
status: In Progress → Fix Committed
Revision history for this message
Nadia Alramli (nadiana) wrote :

Unfortunately I'm still getting the exception:

Traceback (most recent call last):
  File "/home/nadia/projects/phatch/phatch/core/api.py", line 293, in flush_metadata
    photo.flush_metadata()
  File "/home/nadia/projects/phatch/phatch/core/pil.py", line 388, in flush_metadata
    self.log += exif.flush(self.info['path'],self.metadata)
  File "/home/nadia/projects/phatch/phatch/core/lib/_pyexiv2.py", line 158, in flush
    image.writeMetadata()
IOError: Setting Exif metadata in PNG images is not supported
*
Error 1: Can not write metadata to image 'mouse.png' in folder:
/home/nadia/Desktop/exper/test

Setting Exif metadata in PNG images is not supported

Traceback (most recent call last):
  File "/home/nadia/projects/phatch/phatch/core/api.py", line 293, in flush_metadata
    photo.flush_metadata()
  File "/home/nadia/projects/phatch/phatch/core/pil.py", line 388, in flush_metadata
    self.log += exif.flush(self.info['path'],self.metadata)
  File "/home/nadia/projects/phatch/phatch/core/lib/_pyexiv2.py", line 158, in flush
    image.writeMetadata()
IOError: Setting Exif metadata in PNG images is not supported
*

Stani (stani)
Changed in phatch (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phatch - 0.2.1-4

---------------
phatch (0.2.1-4) unstable; urgency=low

  * Add mlocate as an alternative dependency to locate (Closes: #548251)

phatch (0.2.1-3) unstable; urgency=low

  * replace --install-scripts=/usr/bin with --prefix=/usr
    (so that data files will be installed in the right place as well)

phatch (0.2.1-2) unstable; urgency=low

  * pass --install-scripts=/usr/bin to setup.py (otherwise it will FTBFS when
    default Python version is >= 2.6)

phatch (0.2.1-1) unstable; urgency=low

  [ Stani M ]
   * New upstream release (Closes LP: #198365, #234788, #270478,
    #297241, #304132, #311646, #344548, #352009, #378889, #378890,
    #379280, #379720, #380415, #380776, #380816, #381091, #381145,
    #381149, #381169, #381379, #381660, #382266, #382763, #382766,
    #382776, #382977, #383140, #383664, #383889, #384273, #384315,
    #384322, #384420, #384421, #384495, #384522, #384548, #384974,
    #385058, #385059, #385166, #385246, #385356, #385740, #386411,
    #386494, #386509, #386638, #386643, #386707, #386741, #386761,
    #386772, #387116, #387413, #388094, #388155, #388371, #388848,
    #390070, #391006, #391483, #391484, #391486, #391488, #391539,
    #391542, #392907, #392999, #393183, #393255, #393257, #393993,
    #394022, #394041, #394946, #398704, #413271, #415152, #418519,
    #419459, #419563, #425910)
  * debian/copyright:
    - Added copyrights for the new contributions.
  * debian/control:
    - Added python-notify and libtiff-tools as dependencies

  [ Emilio Pozuelo Monfort ]
  * debian/rules:
    - Install phatch in /usr/share/phatch instead of as a public module.
    - Stop removing a file from a pysupport folder. With the above change
      is not necessary anymore. Closes: #516322.
  * debian/copyright:
    - Add "Copyright" to the debian copyright.
    - Update years.
  * debian/control:
    - move python-nautilus and pkg-config to Build-Depends-Indep.
    - Wrap depends.
  * Update my email address.

  [ Piotr Ożarowski ]
  * Splitting out the package, new binary packages:
    - phatch-cli (command line interface)
    - phatch-doc (documentation for developers)
    - phatch-nautilus (Python nautilus integration)
  * Add blender and inkscape to phatch's Suggests
  * Add imagemagick, libjpeg-progs, exiftran, xcftools and dcraw to
    phatch-cli's Recommends (new actions will use them)
  * Add ttf-freefont and ttf-thai-tlwg to phatch-cli Depends (and add symlinks
    to use fonts from these packages instead of local copies)
  * Add locate to phatch-cli's Depends (used to find fonts)
  * Add python-sphinx and locate to build depens (docs are regenerated at
    build time)
  * Add lintian override for extra-license-file in phatch-doc (false positive)
  * Bump Standards-Version to 3.8.3 (no changes needed)

 -- stani <email address hidden> Mon, 28 Sep 2009 13:15:14 +0100

Changed in phatch (Ubuntu):
status: Confirmed → Fix Released
Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.