List wires connecting components with python

I blew up a Lolin D32 board because of an open solder joint. I want to list the wires connecting components so I can check them with a ohmmeter.

I found bobc’s template here: Netlist to wire list?

Pcbnew is having trouble loading the scripts in: C:\Program Files\KiCad\share\kicad\scripting\plugins

I used a python debugging method from: Getting started using Python Scripts

I got loading error:
import pcbnew
print pcbnew.GetWizardsBackTrace()
Traceback (most recent call last):
File “C:\Program Files\KiCad\lib\python2.7\site-packages/pcbnew.py”, line 2954, in LoadPluginModule
mod = import( ModuleName, locals(), globals() )
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/FPC_(SMD_type)_footprintwizard.py”, line 156, in
FPC_FootprintWizard().register()
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 242, in init
FootprintWizardParameterManager.init(self)
File “C:\Program Files\KiCad\share\kicad\scripting\plugins/HelpfulFootprintWizardPlugin.py”, line 32, in init
self.parameters = {}
AttributeError: can’t set attribute

I’ve spent hours searching with no luck

EDIT: using version 5.16

1 Like

That script is not a plugin and will not show up in pcbnew. It’s intended to be run with python directly and it’s input is the netlist file that eeschema outputs.
The error you pasted is also irrelevant.
I’m not sure what output format you expect but maybe netlist view mode in interactive html bom plugin can help

Thanks. I had a feeling I was way off track somehow. I could have just looked at the netlist, but wanted to learn the Python interface.

Some of my old projects have xml netlists. I can’t remember how made those. I think it is the intermediate netlist file. Can keep that file without deleting it? Any method is appreciated. Thanks

I don’t understand the question.

Xml file is likely the intermediate file that eeschema’s built in bom tool generates. It contains roughly the same information as netlist file but in xml form.

There doesn’t appear to be an XML tab in the schematic netlist dialog so I made my own hack tab using perl instead xslt because I have no clue about xslt.
kicadnet

I guess I should show what I learned. I needed the netlist XML because the kicad_netlist_reader python module is an XML netlist manipulator using SAX. I used the python installed on my PC. By coincidence the first wire I listed was the wire that was not soldered.

wire.py (450 Bytes)

Output

> ./wire.py D90_ESP32_wifi_remote/D90_ESP32_wifi_remote.xml
/D32_5V                  U1-29   J2-2    
/5vGPS                   J1-5    U2-12   
/5vShutter               J1-2    U2-4    
/5vFocus                 J1-1    U2-2    
GND                      J1-3    U1-32   U2-6    U1-2    U2-5    
/D32_3V                  U1-1    U2-7    
/SHUTTER                 U2-3    U1-6    
/CAMERA_5V               U2-8    J1-4    J2-1    
/FOCUS                   U1-4    U2-1    
/GPS                     U2-11   U1-20   

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