phatch-dev team mailing list archive
-
phatch-dev team
-
Mailing list archive
-
Message #01181
[Bug 531728] Re: [Test] 'NoneType' object has no attribute 'bands'
** Changed in: phatch
Assignee: (unassigned) => Nadia Alramli (nadiana)
--
[Test] 'NoneType' object has no attribute 'bands'
https://bugs.launchpad.net/bugs/531728
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: Confirmed
Bug description:
This bug only happens with PIL 1.1.7, eg on Ubuntu Lucid
actionlist: /home/stani/Desktop/background/tests/output/actionlists/watermark_Method=Scale.phatch
Error 0:Can not apply action Watermark on image 'exif.jpg' in folder:
/home/stani/Desktop/background/tests/input
'NoneType' object has no attribute 'bands'
Action:{'fields': {'Horizontal Justification': u'Right',
'Horizontal Offset': '50%',
'Mark': 'Phatch Small',
'Method': u'Scale',
'Offset': '5%',
'Opacity': u'100',
'Orientation': u'Flip Top Bottom',
'Position': u'Custom',
'Vertical Justification': u'Bottom',
'Vertical Offset': '50%',
'__enabled__': 'yes'},
'label': 'Watermark'}
Traceback (most recent call last):
File "/home/stani/Desktop/background/phatch/core/api.py", line 617, in apply_action_to_photo
photo = action.apply(photo, read_only_settings, cache)
File "/home/stani/Desktop/background/phatch/core/models.py", line 106, in apply
photo.get_layer().apply_pil(self.pil, **values)
File "/home/stani/Desktop/background/phatch/core/pil.py", line 747, in apply_pil
self.image = function(self.image, *arg, **keyw)
File "/home/stani/Desktop/background/phatch/actions/watermark.py", line 45, in watermark
orientation, opacity)
File "/home/stani/Desktop/background/phatch/lib/imtools.py", line 276, in generate_layer
mark = reduce_opacity(mark, opacity)
File "/home/stani/Desktop/background/phatch/lib/imtools.py", line 373, in reduce_opacity
alpha = get_alpha(im)
File "/home/stani/Desktop/background/phatch/lib/imtools.py", line 525, in get_alpha
return image.split()[-1]
File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1497, in split
if self.im.bands == 1:
AttributeError: 'NoneType' object has no attribute 'bands'
*
References