Using Cairo on an m1, python 3.10, cairosvg from conda-forge
Command-line version translating from file to file works fine. However, direct library calls fail on any non-file output with a memory-write error from CFFI.
I don't know much about CFFI, but a small fix to surfaces.py to also catch MemoryErrors allows Cairo to fallback gracefully to a named temporary file as an intermediate form and work as expected.
Using Cairo on an m1, python 3.10, cairosvg from conda-forge
Command-line version translating from file to file works fine. However, direct library calls fail on any non-file output with a memory-write error from CFFI.
I don't know much about CFFI, but a small fix to
surfaces.py
to also catch MemoryErrors allows Cairo to fallback gracefully to a named temporary file as an intermediate form and work as expected.surfaces.py:662 -> except (SystemError, MemoryError): # noqa
Thanks devs for your work maintaining this useful piece of open source software!
D--