Bom_csv_sorted_by_ref.py

Run command:
python “C:\Program Files\KiCad\bin\scripting\plugins/bom_csv_sorted_by_ref.py” “C:\Users\Public\Documents\Radio Circuit Plans\Power Supplies\BC348_power_supply_kicad\BC348_power_supply_kicad.xml” “C:/Users/Public/Documents/Radio Circuit Plans/Power Supplies/BC348_power_supply_kicad/BC348_power_supply_kicad”

Command error. Return code 1
Error messages:
Traceback (most recent call last):
File “C:\Program Files\KiCad\bin\scripting\plugins/bom_csv_sorted_by_ref.py”, line 49, in
components = net.getInterestingComponents()
File “C:\Program Files\KiCad\bin\scripting\plugins/kicad_netlist_reader.py”, line 624, in getInterestingComponents
ret.sort(key=lambda g: f(g.getRef()))
File “C:\Program Files\KiCad\bin\scripting\plugins/kicad_netlist_reader.py”, line 624, in
ret.sort(key=lambda g: f(g.getRef()))
File “C:\Program Files\KiCad\bin\scripting\plugins/kicad_netlist_reader.py”, line 623, in f
return re.sub(r’([A-z]+)[0-9]+’, r’\1’, v) + ‘%08i’ % int(re.sub(r’[A-z]+([0-9]+)’, r’\1’, v))
ValueError: invalid literal for int() with base 10: ‘PWB+1’

‘PWB+1’ id pin1 of a pad wire point, for net “B+”

What is your kicad version?
Did you run ERC before trying to create a BOM?

the Ki cad version is 5.0.1-4 up to date. Nets have - and + characters seems to cause issue in BOM generation.

ERC was run there are “false” issues with pads. as this is a single sided board.

The unconnected fly line are expected as wired connectors or hard wires will make the finial connections. This is designed to fit in a tight spot ~ 1" high under existing hardware mounting plate.

A couple quick points…

5.0.1-4 is not up to date. You want 5.1.4 (currently at …-1 for Windows) to be fully up to date.

ERC and the BOM script you are running are done at the schematic level. The screenshot you took was of the PCB, and the check there is DRC.

For reference:

  • ERC = Electrical Rules Check
    • EESchema checks the schematic as best it can (w/o knowing the actual function of the symbols) if the schematic makes electrical sense based on symbol pin types.
  • DRC = Design Rules Check
    • PCBNew checks the PCB for manufacturability based on the supplied design rules which are either driven by the manufacturing capabilities of the board manufacturing process or special electrical and/or safety requirements.
1 Like

BOM - issue catching up with : [SembazuruCDE]

  1. ERC run error free Warning free.
  2. Kicad is the latest version.
  3. Windows 10 is up to date also.

Added Pic of schematic :

No issues with the schematic.

The problem is that Python script is not prepared to handle reference IDs not of the form [A-z]+[0-9]+ when extracting the number. You could ask the author if this requirement should be relaxed, or change the IDs to conform.

I am the author. Bad Bad me. I came to the same conclusion as the sort was dyeing in B- and B+ connector references. B_NEG B_PLS may have to do.

Thanks

1 Like

Doesn’t look like your RE allows _ unless it’s included in A-z.

I guess that is an advanced sort routine in python. Living with the obviouse renamed B+* to BP* sand B-* to BN* connector/jack references. The parts list then generated with no issues.

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