[reportlab-users] Re: broken code
Tue, 9 Sep 2003 11:40:18 +0100
In article <firstname.lastname@example.org>, NLH AS
>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).
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')