← Back to team overview

phatch-dev team mailing list archive

[Bug 440273] Re: Tamogen ZeroDivisionError

 

This bug was fixed in the package phatch - 0.2.3-2

---------------
phatch (0.2.3-2) unstable; urgency=low

  * phatch.desktop and menu files are now shipped by phatch package
    (LP: #449210)
    - add lintian overrides for above changes (phatch depends on phatch-cli so
      everything is ok)

phatch (0.2.3-1) unstable; urgency=low

  * Upstream bugfix release (Closes LP: #448845, #446725, #445943)

phatch (0.2.2-1) unstable; urgency=low

  * Upstream bugfix release (Closes LP: #236548, #436595, #437161,
   #437376, #437852, #439108, #439359, #440273, #440956)
  * debian/control: Dropped dependency python-wxgtk2.6

 -- Julien Lavergne <julien.lavergne@xxxxxxxxx>   Tue,  13 Oct 2009
18:49:27 +0100

** Changed in: phatch (Ubuntu)
       Status: Confirmed => Fix Released

-- 
Tamogen ZeroDivisionError
https://bugs.launchpad.net/bugs/440273
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Fix Released
Status in “phatch” package in Ubuntu: Fix Released

Bug description:
While running the test suite on the tamogen action I got this error:

ERROR:actionlist: /home/nadia/projects/phatch/tests/output/actionlists/convert_mode_tamogen_Mode=1_FillType=Folder_Rows=1000_Columns=1.phatch generated the following logs:
Error 0:Can not apply action Tamogen on image 'fish.gif' in folder:
/home/nadia/projects/phatch/tests/input

float division

Action:{'fields': {'Canvas Height': '100%',
            'Canvas Width': '100%',
            'Columns': u'1',
            'Fill Folder': '<folder>/<subfolder>',
            'Fill Image': '<path>',
            'Fill Type': u'Folder',
            'Rows': u'1000',
            '__enabled__': 'yes'},
 'label': 'Tamogen'}

Traceback (most recent call last):
  File "/home/nadia/projects/phatch/phatch/core/api.py", line 608, in apply_action_to_photo
    photo = action.apply(photo, read_only_settings, cache)
  File "/home/nadia/projects/phatch/phatch/core/models.py", line 106, in apply
    photo.get_layer().apply_pil(self.pil, **values)
  File "/home/nadia/projects/phatch/phatch/core/pil.py", line 709, in apply_pil
    self.image = function(self.image, *arg, **keyw)
  File "/home/nadia/projects/phatch/phatch/actions/tamogen.py", line 42, in mosaic
    canvas_width, canvas_height, fill_image, fill_folder)
  File "/home/nadia/projects/phatch/phatch/other/tamogen.py", line 81, in mosaic
    fill_img, tone_diff = fill_images.findClosestImageAndToneDiff(bsection)
  File "/home/nadia/projects/phatch/phatch/other/tamogen.py", line 108, in findClosestImageAndToneDiff
    image_avg = sum(Stat(diff_image).mean)
  File "/usr/lib/python2.5/site-packages/PIL/ImageStat.py", line 64, in __getattr__
    v = getattr(self, "_get" + id)()
  File "/usr/lib/python2.5/site-packages/PIL/ImageStat.py", line 120, in _getmean
    v.append(self.sum[i] / self.count[i])
ZeroDivisionError: float division
*

I'm attaching the actionlist and the image to reproduce the error.



References