-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'NoneType' object has no attribute 'containerSize'? #179
Comments
The current |
Any idea how can I overcome this problem? Any alternative solutions? |
Use Inkscape or any other full-spec SVG renderer to rasterize. |
Commented in #192 (comment) , m88 (one milestone later) is when SkSVG becomes non-experimental . I need SVG functionality from m103+ myself. |
My investigation is trying alternatives to rsvg (which is cairo-based) which already works well - I just want another choice. It has stuff equivalent to m103+ so probably will suit you well. |
In particular I know the width, height retrieval with rsvg works - I am basically looking for skia-python equivalent of all the rsvg routines I use, and found the containerSize call in skia-python does not work. |
To use rsvg, you'll probably need to switch to drawing with pycairo too. |
Here is your code modified to work against current (117bX on my hard disk, but probably likely with 116b2 too):
There are three sets of modifications - the addition of As you found, if skia is not happy with either the stream or the svg, there is not much feedback. If you have more comments about why your memory stream initialization does not work, or how your svg data is invalid, I'd like to know. But for now, I'd suggest integrate the svg-sanitizer into your work :-) . Sorry can't be more constructive. |
I'm working on my project to create patterns from svg code, but I have problem. It turns out that documentation doesn't provide explanation why SVGDOM is returning none. Anyway, I provide simple code that I'm working, just a note if I use simple svg code of shape or something, then it's working but when I use code from inkscape or something else, this happens.
I got this error...
And this is code....
Any idea how to make this work is more then welcome. Thanks in advance!
The text was updated successfully, but these errors were encountered: