-
-
Notifications
You must be signed in to change notification settings - Fork 29
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 '__imatmul__' #107
Comments
Yeah, that's a weird bug. You can totally just multiply it with imul but it crashes in the other form. svg[-1] *= "translate(100,100)" I think I always short handed added those values that I never bothered to check the create a new object form of the multiplication there. |
At issue is that the It's a genuine bug, I'll have it fixed shortly. Just need to make sure I'm doing everything right and crossing all ts and dotting the js, so as to not introduce additional bugs. |
Ah, that makes a lot of sense. Take your time; no rush. It's not worth messing anything else up. |
It's just checking through some code and making sure it's not going anywhere weird, and writing a test case and making sure it passes all the current test cases. It makes it fairly safe. 1.4.12 is done. Publishing soon. |
Fixed and published. The code is in maintenance mode so bug fixes are a priority and usually rather small and dealt with rapidly. Likely any big future changes would be in #87 rewrite, since that would be able to capture a lot of things this library misses. So, it's kinda a priority to fix things well and fast. Just took some double checking and authoring some test code. |
First off, thanks for all of the documentation; it's apparent to me you guys have put hours in to write that. So, before reading, if I made a usage error, I apologize beforehand, but I've been stuck trying to translate the entire contents of an SVG file.
Before I go into the issue, keep in mind my main goal is to apply a series of transformations, like translations or rotations, to the entire SVG file.
I start by importing the package as
from svgelements import *
Then, I import my svg file with
svg = SVG.parse("path.svg")
Upon typing
svg
in the python command line, I get the full object which confirms (at least I think) my file was imported successfully:It only made sense for me to do something like
Group(svg[-1])
, which worked, and I would get:Then, I would attempt to translate this svg:
Group(svg[-1]) * Matrix.translate(100, 100)
And the exception comes back as
AttributeError: 'NoneType' object has no attribute '__imatmul__'
Any help would be greatly appreciated, and thanks for all of the work you guys have done!
The text was updated successfully, but these errors were encountered: