Viastitching plugin errors

I have been using plugins created by Jean-Samuel Reynaud, which worked great. I just have problems with the viastitching plugin. So here are the errors.
I created a very simple layout with two pin headers with nets /sig and /gnd, and two metal filled areas all connected to net /gnd.
Then opened the viastitching tool (without preselecting any drawings). I left everything default and selected the net as /gnd.
Then after I click run, I got the following errors.

If I don’t select any net, then 0 vias will be drawn:
The kicad version is 5.0.2. The code was from
Did anyone come across similar issues? How did you solve it?

I moved this to the plugin category. Might as well summon @jsreynaud at the same time? Chant’s secret incantation… :fireworks:


“Program Files” in your pathname suggests Windoze, but I also see both slashes and back slashes.

I also see reference to Python 2.7 while KiCad is trying to move on to Python V3.

On top of that, why bother for a script for via’s at all?
I assume it’s an old script, probably for KiCad V4 and in KiCad V5 you can just drop via’s on a zone or on tracks and they become part of the net that they are connected to. There is not much need to use a script for via’s anymore.

Looks like you are trying to use the plugin with a newer version of kicad then what the plugin supports.
You should post exact kicad version info and plugin version, or at least where you got it from.


Just edited the post with the version and the link to the code.
Thanks for the remind

This commit changed the line that is failing in your error message. Looks like current version of the plugin works with kicad 5.1 but not 5.0.2


Problem solved after updating to the 5.1.8 version.
Thanks a lot for your help!

1 Like

“Windoze” is sooo … adolescent, you seldom see Windows users showing the same disrespect to Linux users.

And your point?

And yet KiCad 5.1.8 still installs Python 2.7.

Taking offense to some silly words without any regard to context seems to be the fashion these days. Just as using “master” and “slave”, and treating those words just as if the SPI interface of my uC could be insulted.

With both slashes and backslashes in a pathname the path is not valid regardless of what operating system you use.

Good you verified that. I’m not deep into KiCad development, but apparently KiCad depends on some old libraries which have (had?) not been ported to Python V3 yet on some OS’es. I think (but am not sure) that Python V2 has been completely dropped from KiCad on Linux.

Incorrect. Win-whatz-it doesn’t care.

Most of the time Windows will auto correct the path allowing both forward and backslashes in a path, even mixed. But there are still times when it does not.

Windows doesn’t correct anything. Some programs might (like explorer, it will normalize the path).
OS itself explicitly allows both forward and back slashes as directory separators.

The latest 5.1.x Testing build for Windows 64 bit, Python scripting console shows Python 2.7.18

Unfortunately, that is true on Windows (Windoze, Winblows, M$Win, etc… As a Win10 user I use whichever of those derogatory variants as fits my current mood). There are some support libraries that the Windows compiler environment depends on that are still stuck on Python2.7 so as a result KiCad on Win is also stuck on Python2.7. I think there is some progress to fix this, but the effort isn’t our KiCad developers alone. Even if our devs submit fixes to those other development teams, it is up to the other development teams to implement the fixes. Such is the cost of not reinventing every wheel.

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