svg2sif
svg2sif copied to clipboard
'float' object has no attribute '__getitem__'
I'm getting this error trying to export anything from Inkscape as an .sif file:
Traceback (most recent call last):
File "synfig_output.py", line 1344, in <module>
e.affect(output=False)
File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
File "synfig_output.py", line 1053, in effect
SynfigPrep.effect(self)
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 483, in effect
propagate_attribs(self.document.getroot())
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 383, in propagate_attribs
dw = get_dimension(node.get("width", vw))
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 455, in get_dimension
elif s[-1] == "%":
TypeError: 'float' object has no attribute '__getitem__'
Example of a file that causes this error: https://github.com/mure-apps/origraph/blob/views/src/img/supernode.svg
Same here
Same here. I'm on Antergos+XFCE. Full log:
Traceback (most recent call last):
File "synfig_output.py", line 1344, in <module>
e.affect(output=False)
File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
File "synfig_output.py", line 1053, in effect
SynfigPrep.effect(self)
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 483, in effect
propagate_attribs(self.document.getroot())
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 383, in propagate_attribs
dw = get_dimension(node.get("width", vw))
File "/usr/share/inkscape/extensions/synfig_prepare.py", line 455, in get_dimension
elif s[-1] == "%":
TypeError: 'float' object has no attribute '__getitem__'
According to my experience, if the input SVG file is generated in responsive size mode, script fails to create a SIF file. Just regenerate the input SVG file in fixed-size mode and try again.
Thanks mghmgh1281375. That's worked fine!