Svg2shenzhen inkscape - kicad

Hello I am using MacBook, Inkscape 1.1, with plugin SVG2SHENZHEN 0.2.16 with Kicad 6.0.
I can’t export an Inkscape svg file using SVG2SHENZHEN to Kicad. I watched this video Drawing PCBs with Inkscape Creating printed circuit board designs using Inkscape, SVG2Shenzhen and … - YouTube

When I Export using SVG2SHENZHEN I see ‘CHOOSE PATH TO EXPORT’ box. I don’t know how to direct this to Kicad as a PCB, I also get an error message saying.
Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.
export.py:224: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–path", action=“store”, type=“string”, dest=“path”, default="~/", help="")
export.py:225: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option(’-f’, ‘–filetype’, action=‘store’, type=‘string’, dest=‘filetype’, default=‘jpeg’, help=‘Exported file type’)
export.py:226: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–crop", action=“store”, type=“inkbool”, dest=“crop”, default=False)
export.py:227: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–dpi", action=“store”, type=“float”, dest=“dpi”, default=600)
export.py:228: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–threshold", action=“store”, type=“float”, dest=“threshold”, default=128.0)
export.py:229: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–openfactory", action=“store”, type=“inkbool”, dest=“openfactory”, default=“true”)
export.py:230: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–openkicad", action=“store”, type=“inkbool”, dest=“openkicad”, default=“true”)
export.py:231: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–autoflatten", action=“store”, type=“inkbool”, dest=“autoflatten”, default=“true”)
export.py:232: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
self.OptionParser.add_option("–debug", action=“store”, type=“inkbool”, dest=“debug”, default=False)
export.py:736: DeprecationWarning: Effect.affect is now Effect.run(). The output argument has changed.
e.affect()
export.py:336: DeprecationWarning: self.args[-1] is now self.options.input_file.
curfile = self.args[-1]
Traceback (most recent call last):
File “export.py”, line 740, in
_main()
File “export.py”, line 736, in _main
e.affect()
File “/Applications/Inkscape 2.app/Contents/Resources/share/inkscape/extensions/inkex/deprecated.py”, line 183, in affect
return self.run(args=args)
File “/Applications/Inkscape 2.app/Contents/Resources/share/inkscape/extensions/inkex/base.py”, line 131, in run
self.save_raw(self.effect())
File “export.py”, line 313, in effect
self.processExportLayer()
File “export.py”, line 337, in processExportLayer
layers = self.get_layers(curfile)
File “export.py”, line 537, in get_layers
if layer_label_name in self.layer_map.iterkeys():
AttributeError: ‘dict’ object has no attribute ‘iterkeys’

Is this Chinese? It is kind of hard to understand this. Could you at least format the robot output it a bit?

1 Like

Hi, this is the error message, I can’t make any sense of it either. Basically I can’t seem to export the svg file to Kicad. What I’m doing wrong? I’ve downloaded up to date software and it still is doing the same thing.

The scripts seems to be written in python 2 but it is run with python 3 and doesn’t work with it. I don’t know how the script works and what to do about it; to me it looks like it’s an Inkscape extension and has nothing to do with KiCad when it’s run, it just produces files for KiCad.

1 Like

I think it may be a software version problem

According to svg2shenzhen’s repo, 2.16 is almost 3 years old, and the latest is 2.18.7. In general prefer the original documentation to some video which may be out of date.

If you still have problems then the Inkscape forums might be of more help since KiCad only uses the result.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.