What steps will reproduce the problem?
1. Converting an HTML document with images stored on S3 is throwing the
following exception for each image:
TypeError: can't multiply sequence by non-int of type 'float'
WARNING:ho.pisa:Error in handling image
u'<img class=""
src="https://votizen-upvote.s3.amazonaws.com/media/member/pics/299ff13c58.jpg?Si
gnature=CyUhqCCSoYhQr29v%2BK9%2BpuHZr8Y%3D&Expires=1302144546&AWSAccessK
eyId=AKIAIV3FJ7U2F3GO6TNQ"/>'
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/sx/pisa3/pisa_tags.py", line 307, in start
img.drawWidth *= img.pisaZoom
What is the expected output? What do you see instead?
I expect the images to be processed and included in the PDF.
What version of the product are you using? On what operating system?
This happened on both OSX and Ubuntu.
Please provide any additional information below.
The problem is with:
img.drawWidth *= img.pisaZoom
img.drawHeight *= img.pisaZoom
The 'drawWidth' and 'drawHeight' are both '50px' instead of an int. Maybe
replace it with the following:
import re
if 'string' == type( img.drawWidth):
img.drawWidth = float(re.sub('\D', '', img.drawWidth))
if 'string' == type( img.drawHeight):
img.drawHeight = float(re.sub('\D', '', img.drawHeight))
Original issue reported on code.google.com by mattesnider on 7 Apr 2011 at 2:02
Original issue reported on code.google.com by
mattesnider
on 7 Apr 2011 at 2:02