[reportlab-users] Broken code

Andy Robinson reportlab-users@reportlab.com
Tue, 9 Sep 2003 09:17:21 +0100


>
> >Traceback (see foot for full version):
> >
> >  File 
> "/usr/local/lib/python2.3/site-packages/reportlab/pdfbase/pdfdoc.py", 
> >line 1839, in format
> >    dict["Filter"] = PDFArray(map(PDFName,self._filters))
> >AttributeError: PDFImageXObject instance has no attribute '_filters'
> >
> >Any help would be most appreciated.
> >

Actually this looks like a bug; we don't initialize
self._filters in __init__, and it seems that you have found
a way to initialize a PDFImageXObject without calling
one of the 3 methods we use to create them.
The line "self.filter = PDFName('ASCII85Decode')"
in __init__ looks unnecessary and should be initializing
an empty array of filters. Will try to fix this today. 

I'd like to see a full runnable example with the GIF 
it if possible...

- Andy