[reportlab-users] Error reporting: please say what image is failing

Andy Robinson andy at reportlab.com
Wed Mar 17 17:23:49 EDT 2010


Yes, but I think we can catch and decorate the exception with whatever
image filename or URL was used. This has bitten us in the past too.

Andy Robinson
ReportLab

On 17 Mar 2010, at 19:23, Mike Driscoll <mdriscoll at co.marshall.ia.us>
wrote:


> On 3/17/2010 12:35 PM, Roberto Alsina wrote:

>> I got this reported as an Issue in rst2pdf:

>>

>> http://code.google.com/p/rst2pdf/issues/detail?id=287

>>

>> The real problem is (I think) fixed already, the error was this:

>>

>> File "/Library/Python/2.6/site-packages/reportlab/pdfgen/

>> canvas.py", line

>> 673, in drawImage

>> rawdata = image.getRGBData()

>> File "/Library/Python/2.6/site-packages/reportlab/lib/utils.py",

>> line

>> 651, in getRGBData

>> self._dataA = ImageReader(im.split()[3])

>> File "/Library/Python/2.6/site-packages/PIL/Image.py", line

>> 1497, in split

>> if self.im.bands == 1:

>> AttributeError: 'NoneType' object has no attribute 'bands'

>>

>> But anyway, what the user says, which is reasonable, is that maybe

>> if RL fails

>> when processing an image it could report what image is causing the

>> problem?

>>

>

> Technically, that error appears to be coming from PIL, not RL. You'd

> probably need to report the feature request to their list.

>

> - Mike

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users



More information about the reportlab-users mailing list