Open ghost opened 7 months ago
Here's the result if I change FP_LIB_PATH to 'usr/share/kicad/footprints' in kicad.py
(base) twinlizzie@twinlizzie-MS-7C51:~/Ngnuity-Repos/sylvie-2024/schematics/skidl_code$ python esp32_motor-pcb-x3_final.py
Circuit: Parts: 17 Nets: 36
Traceback (most recent call last):
File "/home/twinlizzie/Ngnuity-Repos/sylvie-2024/schematics/skidl_code/esp32_motor-pcb-x3_final.py", line 270, in <module>
sp = SkiPart(brd.DC(part.loc), part, side=side)
File "/home/twinlizzie/miniconda3/lib/python3.10/site-packages/pcbflow/kicad.py", line 288, in __init__
super().__init__(
File "/home/twinlizzie/miniconda3/lib/python3.10/site-packages/pcbflow/kicad.py", line 42, in __init__
self.parse()
File "/home/twinlizzie/miniconda3/lib/python3.10/site-packages/pcbflow/kicad.py", line 273, in parse
self._parse_fp_text(v["fp_text"])
File "/home/twinlizzie/miniconda3/lib/python3.10/site-packages/pcbflow/kicad.py", line 148, in _parse_fp_text
layer = self._map_layers(e["layer"])[0]
IndexError: list index out of range
Bug fixed by adding this layer to the list in kicad.py:
KI_LAYER_DICT = { "F.SilkS": "GTO", "F.Paste": "GTP", "F.Mask": "GTS", "F.Cu": "GTL", "F.Fab": "GTD", "F.CrtYd": "GTO", # Assuming F.CrtYd should map to the same layer as F.SilkS }
Credits to ChatGPT.
It also seems like I have to use Kicad 5 footprints, though it could have just been an isolated bug with a special component (in this case, a capacitor) that was causing issues.
@khanumballz glad you found a fix! I would not be surprised if pcbflow has issues with newer versions of KiCAD libraries since the data format and mapping of layers can change. I am surprised ChatGPT was able to offer assistance--I guess pcbflow is somehow part of its massive training dataset!
I cannot complete any of the examples, except for the ones that do not include any parts:
Not sure how to set the footprint directory. I've tried modifying kicad.py itself, with a little bit of luck, though it only leads to more errors.
Code: