Error in HighlightFileField

Bug #385356 reported by Nadia Alramli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Medium
Stani

Bug Description

Hi,

When executing the attached actionlist on the any image I get the following:
Error 0: Can not apply action Highlight on image 'feed-icon1.png' in folder:
/home/nadia/Desktop/exper/test

Highlight: a filename with a valid extension was expected.
You can only use files with the following extensions:
bmp, bw, cmyk, cur, dcx, dib, flc, fli, fpx, gbr, gd, gif, ico, im,
imt, jpe, jpeg, jpg, mcidas, mic, msp, pbm, pcd, pcx, pgm, png, ppm,
psd, rgb, sun, tga, tif, tiff, xbm, xpm.

Action: {'fields': {'Highlight': 'Glass',
            'Resample Highlight': 'antialias',
            '__enabled__': u'true'},
 'label': 'Highlight'}

Traceback (most recent call last):
  File "/home/nadia/projects/phatch/phatch/core/api.py", line 314, in apply_action
    photo = action.apply(photo,setting,cache)
  File "/home/nadia/projects/phatch/phatch/core/models.py", line 55, in apply
    values = self.values(photo.get_info())
  File "/home/nadia/projects/phatch/phatch/core/models.py", line 51, in values
    return self.get_fields(info,convert=True,pixel_fields=pixel_fields)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 304, in get_fields
    value = self.get_field(label,info)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 283, in get_field
    return self._get_field(label).get(info,label)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 409, in get
    label,test)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 681, in to_python
    return super(DictionaryReadFileField,self).to_python(x,label,test)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 659, in to_python
    value = super(ReadFileField, self).to_python(x,label)
  File "/home/nadia/projects/phatch/phatch/core/lib/formField.py", line 651, in to_python
    textwrap.fill(', '.join(self.extensions),70)))
ValidationError: Highlight: a filename with a valid extension was expected.
You can only use files with the following extensions:
bmp, bw, cmyk, cur, dcx, dib, flc, fli, fpx, gbr, gd, gif, ico, im,
imt, jpe, jpeg, jpg, mcidas, mic, msp, pbm, pcd, pcx, pgm, png, ppm,
psd, rgb, sun, tga, tif, tiff, xbm, xpm.
*

Thanks

Revision history for this message
Nadia Alramli (nadiana) wrote :
Revision history for this message
Stani (stani) wrote :

Thanks a lot!

Changed in phatch:
assignee: nobody → stani (stani)
importance: Undecided → Medium
status: New → Confirmed
Stani (stani)
Changed in phatch:
status: Confirmed → In Progress
Revision history for this message
Stani (stani) wrote :

This was because the highlight action was using a deprecated highlight name "Glass". I changed it to "Sphere Top".

$ bzr diff
=== modified file 'phatch/actions/highlight.py'
--- phatch/actions/highlight.py 2009-06-08 12:17:51 +0000
+++ phatch/actions/highlight.py 2009-06-10 00:35:27 +0000
@@ -65,7 +65,7 @@
     __doc__ = _t('Apply a transparency highlight')

     def interface(self,fields):
- fields[_t('Highlight')] = self.HighlightFileField('Glass')
+ fields[_t('Highlight')] = self.HighlightFileField('Sphere Top')
         fields[_t('Resample Highlight')] = self.ImageResampleField('antialias')

     icon = \

$ bzr commit -m "fix highlight action"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/actions/highlight.py
Committed revision 718.

Changed in phatch:
status: In Progress → Fix Committed
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

Bug attachments

Remote bug watches

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