Reportlab Image object opens filehandles

Tim Hoffman timh at zute.net
Wed Sep 10 10:41:23 EDT 2003


Have a look at limit (or in csh ulimit)

256 open files is the default limit for a user/process. (all about 
conserving resources) you can make this bigger (much bigger ;-) assuming 
you have permissions.

Rgds

Tim

Michael Schmitt wrote:

> Hello.
> 
> I am trying to build a pdf document using:
> ---
> from reportlab.platypus.flowables import Image
> lst = []
> for filename in imageFiles:
>     I= Image(filename, width= 300, height= 300)
>     lst.append(I)
> ---
> Creating an Image object seems to open a filehandle, so if the size of 
> imageFiles increases, I get "IOError: [Errno 24] Too many open files" on a 
> Solaris machine, where the number of simultaneously opened filehandles 
> seems to be limited to roughly 255.
> 
> Is there a way to produce a pdf document with a large number of images 
> without running into the problem of too many open filehandles?
> 
> Thanks for any hints.
> Michael
> 
> 





More information about the Python-list mailing list