Closed JonathanHolvey closed 1 year ago
Thank you for raising your first issue! Your help to improve svglib is much appreciated!
I suppose you are testing with the latest published svglib (1.3.0), right? In that case, could you please test with code from master, as I just pushed a commit that most probably changed the part of the code responsible for the crash.
Yes, I was testing with v1.3.0. I can confirm that the test code above works without any errors when using the master branch.
Many thanks for testing, that may mean that a new release should be done soon, I'll plan that.
Thanks for the quick response!
1.4.0 was released today.
I'm seeing an error when exporting a simple SVG file to PDF using the
renderPDF.drawToFile
method. The error occurs when using the wildcard selector*
to target all children of a certain element, along with another element directly. The SVG and Python code below demonstrate how to reproduce the issue.The SVG file
test.svg
:Python code to reproduce the issue:
The resulting error:
This is a new issue that didn't previously occur with svglib 1.1.0, however, due to updates to dependency packages, it's no longer possible to get this working just by installing that version of svglib. I have a Pipenv lock file in the project that I first saw this issue in, which can be used to install a working set of packages. In that project, I was able to work around the issue by changing the
#bar *
selector to target direct children only;#bar > *
.