Importing svg files into Inkscape may create groups.
Maybe you have seen this:
Tips
For Edge.Cut layers, you need to convert any polygons or objects to paths with only an outline, no fill. Don't use any groups on Edge.Cut layers, and if you have paths with inner cut-outs, break them apart into separate paths.
For Drill layers, place circle objects, and they will be converted into drill pads in KiCad with the same diameter. These drills will not have annular rings, unless you also add copper to the F.Cu and B.Cu layers. Don't use any groups on the Drill layer either.
Importing svg files into Inkscape may create groups.
Yes, this does seem to be the case. I have attached the SVG I'm importing and a picture to show the tree it's forming in the objects panel that I think maybe the root of my problem? (hope it is!)
I'm not sure you will find many folks here using the extension, which calls for drawings to be formatted in very specific ways. I know there have been KiCad users here, but not very often.
I'd seek help at some of the KiCad forums, you'd probably get faster answers. I'll leave this topic open, in case someone drops by, but KiCad user groups will be more likely to have your answers.
I'd seek help at some of the KiCad forums, you'd probably get faster answers. I'll leave this topic open, in case someone drops by, but KiCad user groups will be more likely to have your answers.
Thank you, I will ask over at the kicad forum. Is how my SVG files load in as a nested tree normal behaviour?
This one here with a strangely named g6413 folder that is holding the SVG files inside it?
Here is the error message. 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
Yes I’ve got that project option, I tried that, but I keep getting an empty file. where it says which folder to send it to, how do you know where to send when exporting to Kicad?
New to Inkscape, and having a fair bit of trouble with getting anything out of the plug-in and could really do with some help.
Please review this guidance and provide more details.
OK, here is more information.
I open Svg2Shenzhen
https://imgur.com/zCaZipV
I then import my SVG with multiple layers
https://imgur.com/5yzz3x7
Put my layers into the corresponding layers made by Svg2Shenzhen
https://imgur.com/CiPwb0s
Add a box for Edge cuts
https://imgur.com/D8l5pxY
Run the export plugin
https://imgur.com/QYtF86S
Get the following message
https://imgur.com/1qY2Lkr
It creates a folder, but with empty subfolders and only one file called export_options.pickle, and kicad never opens.
https://imgur.com/GLLaOZS
Hope this helps?
Importing svg files into Inkscape may create groups.
Maybe you have seen this:
https://github.com/badgeek/svg2shenzhen#tips
For more assistance, please provide example files that are being imported into Inkscape.
Yes, this does seem to be the case. I have attached the SVG I'm importing and a picture to show the tree it's forming in the objects panel that I think maybe the root of my problem? (hope it is!)
https://imgur.com/kXXWxd3
Where as the guide I'm trying to follow along with doesn't seem to have the same group? file structure?
https://imgur.com/pZBPZwr
https://www.youtube.com/watch?v=Sbkvza8cKQE
Sorry really new to inkscape so to be honest I don't really know how to best describe the issues I'm having.
I'm not sure you will find many folks here using the extension, which calls for drawings to be formatted in very specific ways. I know there have been KiCad users here, but not very often.
I'd seek help at some of the KiCad forums, you'd probably get faster answers. I'll leave this topic open, in case someone drops by, but KiCad user groups will be more likely to have your answers.
Thank you, I will ask over at the kicad forum. Is how my SVG files load in as a nested tree normal behaviour?
This one here with a strangely named g6413 folder that is holding the SVG files inside it?
https://imgur.com/kXXWxd3
The shared svg file has many groups, and groups within groups, but that may not be the only issue with the document causing the extension error.
I'd consider starting with a simple layout, until you have a solid knowledge of the workflow.
I have had the same error message using Svg2shenzhen, was there any resolve to this issue?
@Elliott I managed to get it working with Inkscape v1.1 if you post your error message I may be able to help.
Here is the error message.
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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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 withargparser
. You must changeself.OptionParser.add_option
toself.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()
. Theoutput
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
What version of Svg2shenzhen was you using with Inkscape V1.1?
What version of Svg2shenzhen was you using with Inkscape V1.1?
@Elliott that latest version, forked by another user to include non played through-hole drill layers.
On your export tab, do you have it set to export as a Project or Module (you want it set to Project, as modules never worked for me).
Hello thank you for your reply, i appreciate your help:-)
The export window says
EXPORT AS:
KICAD PCB
KICAD MODULE
PNG IMAGE
I updated Svg2shenzhen 0.2.18.7 but still the same error message.
also with another error message: “bitmap2component_osc”cannot be opened because the developer cannot be verified.
What do you have set on this window?
Yes I’ve got that project option, I tried that, but I keep getting an empty file.
where it says which folder to send it to, how do you know where to send when exporting to Kicad?