• Editor
  • Errors when using inkscape spine exporter

Related Discussions
...

Hey guys,

I just picked up spine and am trying to export svg's from inkscape using the bundled script. I pasted the appropriate files in the user extensions folder. In the extensions menu i have 'export to spine as one option and 'spine/export' as another. They both have different options. When I use 'export to spine' i get this:

InkscapeToSpine.py:284: DeprecationWarning: inkex.localize was moved to inkex.localization.localize
inkex.localize()
Traceback (most recent call last):
File "InkscapeToSpine.py", line 285, in <module>
effect = SpineExporter()
File "InkscapeToSpine.py", line 40, in init
inkex.Effect.init(self)
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 234, in init
super(SvgInputMixin, self).init()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\deprecated.py", line 76, in init
self.svg = SvgDocumentElement()
AttributeError: can't set attribute

And when I try to run spine -> export I get this:

Traceback (most recent call last):
File "PathsToSpine.py", line 30, in <module>
from string import rstrip
ImportError: cannot import name 'rstrip' from 'string' (C:\Program Files\Inkscape\lib\python3.8\string.py)

Edit: I also pasted them in the shared/extensions folder, which came up with the same error. I reinstalled python just in case to no avail.

Any help?

Thanks =)

Hello, a search in the forum seems to suggest that the inkscape script is outdated:
Inkscape to Spine script

As it was a user contributed script, if you're in urgency a solution may be to use an older version of Inkscape.

4 ay sonra

Today I invested some time in investigating this script and patching it up in order to work with Inkscape 1.x. Currently I have the export from Inkscape to Spine working. I still need to have a look at the PathsToSpine file. I will submit an MR and provide my changes to the community. I just need a little bit more time to patch things up. If everything works well I should be able to finish it in a few days.

For the time being this is the working version I have. I will however do a proper MR but for anyone interested here would be the code for InkscapeToSpine.py. I still need to add more comments etc. so keep in mind that this is a work in progress until I am finished...