Hang with lib.formField.ValidationError: In: 'str' object has no attribute 'year'

Bug #566179 reported by Piotr Krukowiecki on 2010-04-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Using latest trunk phatch and also ppa karmic build I'm getting following error and hang:

Traceback (most recent call last):
  File "/home/piotr/dv/phatch/phatch/pyWx/gui.py", line 700, in on_menu_tools_execute
  File "/home/piotr/dv/phatch/phatch/pyWx/gui.py", line 312, in _execute
    update=self._send_update_event, **keyw)
  File "/home/piotr/dv/phatch/phatch/core/api.py", line 805, in apply_actions_to_photos
    is_done, image_index, repeat)
  File "/home/piotr/dv/phatch/phatch/core/api.py", line 877, in apply_actions_to_photo
    if skip_existing_images and is_done(photo):
  File "/home/piotr/dv/phatch/phatch/core/models.py", line 115, in is_done
    folder, filename, typ = self.is_done_info(photo.info)
  File "/home/piotr/dv/phatch/phatch/actions/rename.py", line 61, in is_done_info
    folder = self.get_field('In', info)
  File "/home/piotr/dv/phatch/phatch/lib/formField.py", line 257, in get_field
    return self._get_field(label).get(info, label)
  File "/home/piotr/dv/phatch/phatch/lib/formField.py", line 519, in get
    return self.to_python(self.interpolate(value_as_string, info, label),
  File "/home/piotr/dv/phatch/phatch/lib/formField.py", line 482, in interpolate
    "%s: %s\n" % (_(label), reason), USE_INSPECTOR)
lib.formField.ValidationError: In: 'str' object has no attribute 'year'

I'm attaching image that causes this error.

My action is:

{'actions': [{'fields': {'File Name': u'<filename>',
                         'In': u'/media/2ee9fa70-9c2e-40a5-a350-6c17f163f563/ZdjeciaPodzielone/<####Exif_Image_DateTime.year>_<##Exif_Image_DateTime.month>_<##Exif_Image_DateTime.day>/<filename>.<type>',
                         '__enabled__': 'yes'},
              'label': 'Rename'}],
 'description': '',
 'version': '0.2.7'}

In Image Inspector there's a <Exif_Image_DateTime> but it has no .year etc suffixes.

BTW, it'd be nice if there was a variable <use_any_tag_exif_or_whatever_exists_to_get_image_creation_year> etc...

Stani (stani) on 2010-04-19
Changed in phatch:
milestone: none → 0.2.8
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments