[reportlab-users] ValueError: no memory after 4GB
shaw.th at utexas.edu
Tue Apr 6 15:04:13 EDT 2021
I'm trying to convert an SVG to a BMP that's about 100,000 pixels by
100,000 pixels. My code looks like
drawing = svg2rlg( 'infile.svg')
renderPM.drawToFile(drawing, 'outfile.bmp', fmt='BMP')
When I run it I get "ValueError: _renderPM.gstate: no memory."
By attempting this conversion with progressively larger files and
monitoring the memory usage, I've found that the issue occurs when the
memory consumption exceeds about 4GB. I've checked that I'm using a 64
bit version of Python and have been able to create large arrays that
consume up to 64GB of memory (my total amount of RAM), so it seems like
the issue is specific to reportlab.
Is this expected? Is there any workaround?
Thank you very much.
More information about the reportlab-users