[reportlab-users] Re: broken code
Robin Becker
reportlab-users@reportlab.com
Tue, 9 Sep 2003 11:40:18 +0100
In article <3.0.5.32.20030909115708.01872fe0@pop.domeneshop.no>, NLH AS
<post@nlhas.no> writes
>
>++++
>hi, we've not moved to 2.3 in any great weight yet so this could be of
>use. Do you have a minimal example that gives this error? Can you run
>with the same code and Python-2.2.3?
>++++
>
>Initial reaction: I don't think this can be a 2.3 problem -- the previous
>box was running 2.3 also, so unless the previous installation managed to
>access 2.2 in some weird way (that machine had both, the new server has
>only 2.3) this is more probably a case of the code running with Reportlab
>approx. 1.16 with Python 2.3, but not with RL 1.18.
>
>I'll try to run some tests to whether this is in some way data-specific
>(doesn't look like it) and fiddle with various versions, but this may take
>a little time (urgent though it is).
>
>Rgds
>
>Paul Mothersdill
I've checked the diffs to 1.16 and we seem only to have changed the
names of the filters set in the load methods. Instead of using
A85/Fl/DCT we now use ASCII85Decode/FlateDecode/DCTDecode. I don't think
that should affect anyone. The implication is that here as Andy notes we
are formatting an image object that has never been loaded. There is a
bug in that _filters isn't initialised. Perhaps the line near 1749 in
the __init__ should read self._filters = 'ASCII85Decode', instead of
self.filter = PDFName('ASCII85Decode')
--
Robin Becker