StefanTraistaru / batch-export

Inkscape extension that allows you to export each layer into a single file.
MIT License
62 stars 7 forks source link

Unknown error when exporting (from converted groups to layers) #18

Closed sevenzerotwo closed 2 years ago

sevenzerotwo commented 2 years ago

Hi. In before, thank you for your work in this tool, it's saving many time and simplifying work! But anyway, seems like there's an error (and i don't know what this error telling about):

Traceback (most recent call last): File "D:\Data\Inkscape\share\inkscape\extensions\batch_export.py", line 339, in _main() File "D:\Data\Inkscape\share\inkscape\extensions\batch_export.py", line 335, in _main exporter.run() File "D:\Data\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run self.save_raw(self.effect()) File "D:\Data\Inkscape\share\inkscape\extensions\batch_export.py", line 175, in effect temporary_file_path = self.manage_layers(layer_id, show_layer_ids, options.hierarchical_layers, options.using_clones) File "D:\Data\Inkscape\share\inkscape\extensions\batch_export.py", line 264, in manage_layers layer_label = layer.attrib["{%s}label" % layer.nsmap['inkscape']] File "src/lxml/etree.pyx", line 2479, in lxml.etree._Attrib.getitem KeyError: '{http://www.inkscape.org/namespaces/inkscape}label'

I was trying to export my svg with multiple layers as a page (and later i will combine it to make booklet pdf). Before, i was using another exporter but when i found your extension, i wanna to try out (the former exporter i use utilize groups to export, so i converted the groups to layers from objects menu)

Do you know what's this error about and/or do you know how to solve/workaround this?

I'm using Inkscape 1.1 in Windows 11 21H2 22000.376

Thank you!

StefanTraistaru commented 2 years ago

Hi,

Thank you for trying out the extension. I tried to look into it, but I don't know exactly how to reproduce this issue on my machine. Can you upload a test inkscape file and a series of instructions that describe how to reproduce the issue, so that I can understand what is going on?

Example:

sevenzerotwo commented 2 years ago

Hi, sorry for the late reply, i recently scrolling through emails and forget about the notifications.

Turns out this is because lack of remaining layer labels when i convert the groups to the layers. Giving labels to all layers through xml editor by adding inkscape:label solves this problem, and i can batch export normally.

Thank you for your answer, i close this issue now.