Closed rosteen closed 4 years ago
Looks like the file uses advanced CSS features like css variables. It might be that cssselect2 doesn't support those. Could you try to report the error to cssselect2 (and link the report from here)?
Thanks for the quick reply - I created an issue there. I also just realized that one of the bqplot
devs raises the possibility of their use of CSS variables causing problems (in other software) in bqplot issue 1159.
Requiring complex css engine just to render SVG is very unfortunate, to say the least. The browser engines are becoming monsters because of the stack of more and more complex technologies to support. But ranting apart, svglib
is counting on cssselect2
to interpret CSS, so I'm afraid we won't able to fix this ourselves. Feel free to reopen if you have any other idea.
I have a project that uses bqplot to render some plots and (I hope) save the results out to SVG files for later conversion to other formats. However, when attempting to read the output SVG files with
svglib
, the read fails with the error below. I'm generally unfamiliar with SVG files, but since these files seem to render fine in a browser my initial guess is that the problem is on thesvglib
side. An example file is attached (saved as a txt to make Github happy). My environment is using Python 3.8.2, svglib 1.0.0 installed via pip, and the latestreportlab
(3.5.46).The error trace is:
chrome_test2.svg.txt