svgwrite icon indicating copy to clipboard operation
svgwrite copied to clipboard

Patching elementTree can cause issues with other packages that do the same thing

Open tmolteno opened this issue 5 years ago • 0 comments

Hi There,

Thanks for svgwrite, it is brilliant.

I've just chased down a strange bug that was due to using svgwrite and meshio in the same project. Both modules use the elementTree patching trick.

This has been patched in meshio, but I thought I should draw your attention to the issue, in case others find the same problem.

This causes an error when svgwrite tries to use elementTree to serialize XML:

TypeError: _serialize_xml_with_CDATA_support() takes 4 positional arguments but 5 were given
../../../virtualenv/python3.6.7/lib/python3.6/site-packages/meshio/_common.py:177: TypeError

The meshio issue is at https://github.com/nschloe/meshio/issues/806

Kind Regards, Tim

tmolteno avatar May 13 '20 10:05 tmolteno