ValueError: no memory after 4GB
"Shaw, Theodore" <[email protected]> Tue, 6 Apr 2021 14:04:13 -0500
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, 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.