Open Zhuoli opened 1 year ago
A workaround to this F0 error is to manually download v6 Schematic symbols here, and set $KICAD_SYMBOL_DIR to location of this v6 Schematic symbols
Proposed FIX: Change "F0" to "Reference"
I believe the field lookup for KiCAD v7 libraries has changed the field name for the reference designator to "Reference"
Proposed FIX: Change "F0" to "Reference"
That worked here. skidl latest with kicad-7.0.2, but this does not fix #180
I am trying to check #182, most things seems to be handled there, just not sure.
Even when changing "F0" to "Reference" will allow parts to load, there is more error/s in 'getattr'.
when debugging self.__getattribute__("fields")
is empty.
@export_to_all
class SkidlBaseObject(object):
# These are fallback lists so every object will have them to reference.
erc_list = list()
erc_assertion_list = list()
def __init__(self):
self.fields = {}
def __getattr__(self, key):
try:
# Don't use super()!! It leads to long run times on Python 2.7.
return self.__getattribute__("fields")[key]
except KeyError:
raise AttributeError
Which version of SKiDL are you using? Is it 1.2.1 from PyPi? I would suggest trying the development version:
pip install git+https://github.com/devbisme/skidl@development
The development version includes some new code for handling KiCad 6 and 7. It's not quite ready for release. For one thing, it needs documentation. You have to use KICAD6
or KICAD7
as follows:
set_default_tool(KICAD7)
Send me the code causing the problem and I'll try it out.
Hello, I have installed the development version of SKiDL as described above but the KICAD7 name is not defined. I cannot see this symbol anywhere in the development branch of the repo. What am I missing?
My apologies! When I finally got around to checking this, I found I'd failed to push the development branch to Github! I've done that, so give it a try and we can move on to whatever problem comes next...
I installed the development version, set KICAD7_SYMBOL_DIR
, called set_default_tool(KICAD7)
but there is still an issue:
Python 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from skidl import *
WARNING: KICAD6_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/john/<frozen importlib._bootstrap_external>:940=>/home/john/<frozen importlib._bootstrap>:241]
>>> set_default_tool(KICAD7)
>>> search('ESP32')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/part_query.py", line 130, in search_parts
for part in search_parts_iter(terms, tool):
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/part_query.py", line 106, in search_parts_iter
lib = SchLib(
^^^^^^^
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/schlib.py", line 88, in __init__
tool_modules[tool].load_sch_lib(
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/tools/kicad7/lib.py", line 140, in load_sch_lib
parent_part = lib[item[1]]
~~~^^^^^^^^^
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/schlib.py", line 209, in __getitem__
return list_or_scalar(self.get_parts_by_name(id))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/schlib.py", line 203, in get_parts_by_name
part.parse(partial_parse)
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/part.py", line 388, in parse
tool_modules[self.tool].parse_lib_part(self, partial_parse)
File "/home/john/.conda/envs/doe/lib/python3.11/site-packages/skidl/tools/kicad6/lib.py", line 331, in parse_lib_part
pin_func = pin_io_type_translation[pin[1].value().lower()]
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'free'
This problem occurred because I erroneously referenced KICAD6 in the KICAD7 library parser. I fixed it in the development branch. Give it a try and see if it works for you.
Hi @devbisme! I tried the updated version and the error is the same, although it is in the kicad7/lib.py now 😅
Python 3.11.3 | packaged by conda-forge | (main, Apr 6 2023, 08:57:19) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from skidl import *
WARNING: KICAD_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/raman/<frozen importlib._bootstrap_external>:940=>/home/raman/<frozen importlib._bootstrap>:241]
WARNING: KICAD6_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/raman/<frozen importlib._bootstrap_external>:940=>/home/raman/<frozen importlib._bootstrap>:241]
>>> set_default_tool(KICAD7)
>>> search('opamp')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/part_query.py", line 130, in search_parts
for part in search_parts_iter(terms, tool):
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/part_query.py", line 106, in search_parts_iter
lib = SchLib(
^^^^^^^
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/schlib.py", line 88, in __init__
tool_modules[tool].load_sch_lib(
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/tools/kicad7/lib.py", line 140, in load_sch_lib
parent_part = lib[item[1]]
~~~^^^^^^^^^
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/schlib.py", line 209, in __getitem__
return list_or_scalar(self.get_parts_by_name(id))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/schlib.py", line 203, in get_parts_by_name
part.parse(partial_parse)
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/part.py", line 388, in parse
tool_modules[self.tool].parse_lib_part(self, partial_parse)
File "/home/raman/.conda/envs/cadquery/lib/python3.11/site-packages/skidl/tools/kicad7/lib.py", line 331, in parse_lib_part
pin_func = pin_io_type_translation[pin[1].value().lower()]
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'free'
KiCad 7 introduced a new pin type: free. I added that to the development branch. Should clear this error.
@devbisme that helped, thank you!
Great project, trying to give it a shot on my end. I'm not sure if i'm running into the exact same issue. But I think this is the same issue as #180 I'm on Ubuntu 22.04, Kicad7
import os
os.environ["KICAD7_SYMBOL_DIR"] = "/usr/share/kicad/symbols/"
os.environ["KICAD7_3DMODEL_DIR"] = "/usr/share/kicad/3dmodels/"
os.environ["KICAD7_3RD_PARTY"] = "/home/jubei/.local/share/kicad/7.0/3rdparty/"
os.environ["KICAD7_FOOTPRINT_DIR"] = "/usr/share/kicad/footprints/"
os.environ["KICAD7_TEMPLATE_DIR"] = "/usr/share/kicad/template/"
os.environ["KICAD_USER_TEMPLATE_DIR"] = "/home/jubei/.local/share/kicad/7.0/template/"
from skidl import *
set_default_tool(KICAD7)
# Create part templates.
q = Part("Device", "Q_PNP_CBE", dest=TEMPLATE)
r = Part("Device", "R", dest=TEMPLATE)
# Create nets.
gnd, vcc = Net("GND"), Net("VCC")
a, b, a_and_b = Net("A"), Net("B"), Net("A_AND_B")
# Instantiate parts.
gndt = Part("power", "GND") # Ground terminal.
vcct = Part("power", "VCC") # Power terminal.
q1, q2 = q(2) # Two transistors.
r1, r2, r3, r4, r5 = r(5, value="10K") # Five 10K resistors.
# Make connections between parts.
a & r1 & q1["B C"] & r4 & q2["B C"] & a_and_b & r5 & gnd
b & r2 & q1["B"]
q1["C"] & r3 & gnd
vcc += q1["E"], q2["E"], vcct
gnd += gndt
generate_netlist()
Results in errors:
WARNING: Could not load KiCad schematic library "Device", falling back to backup library. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:11]
WARNING: Could not load KiCad schematic library "Device", falling back to backup library. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:12]
WARNING: Could not load KiCad schematic library "power", falling back to backup library. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:19]
WARNING: Could not load KiCad schematic library "power", falling back to backup library. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:20]
ERROR: No footprint for GND/#PWR1. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for VCC/#PWR2. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for Q_PNP_CBE/Q1. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for Q_PNP_CBE/Q2. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for R/R1. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for R/R2. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for R/R3. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for R/R4. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
ERROR: No footprint for R/R5. @ [/home/jubei/Documents/Work-Syncthing/python/skidl-test/skidl_tb.py:31]
INFO: 0 warnings found while generating netlist.
INFO: 9 errors found while generating netlist.
I am using the development version. My environment variable for KICAD7_SYMBOL_DIR was never set. However when I open Kicad7, I can go to the symbols and they work fine over there.
Tested the current skidl development branch on KiCad v8, same issue with the missing footprints, even though the correct path is in footprint_search_paths['kicad'] (see below).
# eix-installed all | grep kicad
sci-electronics/kicad-8.0.0
sci-electronics/kicad-footprints-8.0.0
sci-electronics/kicad-meta-8.0.0
sci-electronics/kicad-packages3d-8.0.0
sci-electronics/kicad-symbols-8.0.0
sci-electronics/kicad-templates-8.0.0
# ls
total 3.5K
512 drwxr-xr-x 2 user user 3 2024-03-15 16:09:00 .
1.5K drwxr-xr-x 3 user user 10 2024-03-15 16:01:01 ..
1.5K -rwxr-xr-x 1 user user 1.2K 2024-03-15 16:08:34 example_from_readme_bug_179.py
# cat example_from_readme_bug_179.py
#!/usr/bin/env python3
import os
import sys
os.environ["KICAD_SYMBOL_DIR"] = "/usr/share/kicad/symbols/"
os.environ["KICAD_3DMODEL_DIR"] = "/usr/share/kicad/3dmodels/"
os.environ["KICAD_FOOTPRINT_DIR"] = "/usr/share/kicad/footprints/"
os.environ["KICAD_TEMPLATE_DIR"] = "/usr/share/kicad/template/"
from skidl import *
set_default_tool(KICAD)
lib_search_paths[KICAD].append('/usr/share/kicad/symbols')
footprint_search_paths[KICAD].append('/usr/share/kicad/footprints')
print(f"{footprint_search_paths=}", file=sys.stderr)
# Create part templates.
q = Part("Device", "Q_PNP_CBE", dest=TEMPLATE)
r = Part("Device", "R", dest=TEMPLATE)
# Create nets.
gnd, vcc = Net("GND"), Net("VCC")
a, b, a_and_b = Net("A"), Net("B"), Net("A_AND_B")
# Instantiate parts.
gndt = Part("power", "GND") # Ground terminal.
vcct = Part("power", "VCC") # Power terminal.
q1, q2 = q(2) # Two transistors.
r1, r2, r3, r4, r5 = r(5, value="10K") # Five 10K resistors.
# Make connections between parts.
a & r1 & q1["B C"] & r4 & q2["B C"] & a_and_b & r5 & gnd
b & r2 & q1["B"]
q1["C"] & r3 & gnd
vcc += q1["E"], q2["E"], vcct
gnd += gndt
generate_netlist()
#generate_pcb()
# ./example_from_readme_bug_179.py
footprint_search_paths={'kicad': ['/home/user/.config/kicad', '/usr/share/kicad/footprints'], 'spice': ['/home/user/.config/kicad'], 'skidl': ['/home/user/.config/kicad']}
ERROR: No footprint for GND/#PWR1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for VCC/#PWR2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for Q_PNP_CBE/Q1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for Q_PNP_CBE/Q2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R3. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R4. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R5. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
INFO: 0 warnings found while generating netlist.
INFO: 9 errors found while generating netlist.
ERROR: No footprint for GND/#PWR1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for VCC/#PWR2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for Q_PNP_CBE/Q1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for Q_PNP_CBE/Q2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R1. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R2. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R3. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R4. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
ERROR: No footprint for R/R5. @ [/poolz1_1x4TB_A/cfg/python/skidl/bug_179/example_from_readme_bug_179.py:37]
# ls
total 9.0K
1.5K drwxr-xr-x 2 user user 7 2024-03-15 16:09:18 .
1.5K drwxr-xr-x 3 user user 10 2024-03-15 16:01:01 ..
512 -rw-r--r-- 1 user user 0 2024-03-15 16:09:17 example_from_readme_bug_179.erc
1.0K -rw-r--r-- 1 user user 2.1K 2024-03-15 16:09:18 example_from_readme_bug_179.log
1.5K -rw-r--r-- 1 user user 4.8K 2024-03-15 16:09:18 example_from_readme_bug_179.net
1.5K -rwxr-xr-x 1 user user 1.2K 2024-03-15 16:08:34 example_from_readme_bug_179.py
1.5K -rw-r--r-- 1 user user 2.1K 2024-03-15 16:09:18 example_from_readme_bug_179_lib_sklib.py
# ls /usr/share/kicad/footprints/
total 1.8M
12K drwxr-xr-x 144 root root 12K 2024-03-15 15:37:55 .
4.0K drwxr-xr-x 11 root root 4.0K 2024-03-15 15:37:59 ..
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Audio_Module.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Battery.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Button_Switch_Keyboard.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:52 Button_Switch_SMD.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:54 Button_Switch_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Buzzer_Beeper.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Calibration_Scale.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Capacitor_SMD.pretty
44K drwxr-xr-x 2 root root 44K 2024-03-15 15:37:53 Capacitor_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Capacitor_Tantalum_SMD.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_AMASS.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Connector_Amphenol.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:52 Connector_Audio.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_BarrelJack.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Connector_Card.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_Coaxial.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_DIN.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:54 Connector_Dsub.pretty
28K drwxr-xr-x 2 root root 28K 2024-03-15 15:37:54 Connector_FFC-FPC.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_HDMI.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Connector_Harting.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Connector_Harwin.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:51 Connector_Hirose.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:53 Connector_IDC.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Connector_JAE.pretty
64K drwxr-xr-x 2 root root 64K 2024-03-15 15:37:54 Connector_JST.pretty
108K drwxr-xr-x 2 root root 108K 2024-03-15 15:37:54 Connector_Molex.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:53 Connector_PCBEdge.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:54 Connector_Phoenix_GMSTB.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:52 Connector_Phoenix_MC.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Connector_Phoenix_MC_HighVoltage.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:53 Connector_Phoenix_MSTB.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Connector_Phoenix_SPT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Connector_Pin.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:52 Connector_PinHeader_1.00mm.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:53 Connector_PinHeader_1.27mm.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:51 Connector_PinHeader_2.00mm.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:52 Connector_PinHeader_2.54mm.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:54 Connector_PinSocket_1.00mm.pretty
28K drwxr-xr-x 2 root root 28K 2024-03-15 15:37:53 Connector_PinSocket_1.27mm.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:53 Connector_PinSocket_2.00mm.pretty
32K drwxr-xr-x 2 root root 32K 2024-03-15 15:37:52 Connector_PinSocket_2.54mm.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Connector_RJ.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Connector_SATA_SAS.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Connector_Samtec.pretty
44K drwxr-xr-x 2 root root 44K 2024-03-15 15:37:52 Connector_Samtec_HLE_SMD.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:52 Connector_Samtec_HLE_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_Samtec_HPM_THT.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:54 Connector_Samtec_HSEC8.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Connector_Samtec_MicroMate.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_Stocko.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Connector_TE-Connectivity.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_USB.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Connector_Wago.pretty
40K drwxr-xr-x 2 root root 40K 2024-03-15 15:37:54 Connector_Wire.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Connector_Wuerth.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Converter_ACDC.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Converter_DCDC.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:51 Crystal.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Diode_SMD.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:54 Diode_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Display.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Display_7Segment.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Ferrite_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Fiducial.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Filter.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:54 Fuse.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Heatsink.pretty
40K drwxr-xr-x 2 root root 40K 2024-03-15 15:37:54 Inductor_SMD.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Inductor_SMD_Wurth.pretty
36K drwxr-xr-x 2 root root 36K 2024-03-15 15:37:53 Inductor_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Inductor_THT_Wurth.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Jumper.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 LED_SMD.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 LED_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Module.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Motors.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 MountingEquipment.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:52 MountingHole.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:53 Mounting_Wuerth.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 NetTie.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:52 OptoDevice.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:52 Oscillator.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:55 Package_BGA.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:52 Package_CSP.pretty
76K drwxr-xr-x 2 root root 76K 2024-03-15 15:37:52 Package_DFN_QFN.pretty
24K drwxr-xr-x 2 root root 24K 2024-03-15 15:37:52 Package_DIP.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Package_DirectFET.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Package_LCC.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Package_LGA.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:52 Package_QFP.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Package_SIP.pretty
36K drwxr-xr-x 2 root root 36K 2024-03-15 15:37:52 Package_SO.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:54 Package_SON.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Package_SO_J-Lead.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:53 Package_TO_SOT_SMD.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:53 Package_TO_SOT_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Potentiometer_SMD.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:54 Potentiometer_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 RF.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 RF_Antenna.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 RF_Converter.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 RF_GPS.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 RF_GSM.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 RF_Mini-Circuits.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 RF_Module.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 RF_Shielding.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 RF_WiFi.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Relay_SMD.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:52 Relay_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Resistor_SMD.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:53 Resistor_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Rotary_Encoder.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:55 Sensor.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Sensor_Audio.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Sensor_Current.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Sensor_Distance.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Sensor_Humidity.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Sensor_Motion.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Sensor_Pressure.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Sensor_Voltage.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Socket.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:54 Symbol.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 TerminalBlock.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 TerminalBlock_4Ucon.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 TerminalBlock_Altech.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 TerminalBlock_Dinkle.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:54 TerminalBlock_MetzConnect.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 TerminalBlock_Philmore.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:54 TerminalBlock_Phoenix.pretty
20K drwxr-xr-x 2 root root 20K 2024-03-15 15:37:53 TerminalBlock_RND.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 TerminalBlock_TE-Connectivity.pretty
16K drwxr-xr-x 2 root root 16K 2024-03-15 15:37:54 TerminalBlock_WAGO.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 TerminalBlock_Wuerth.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 TestPoint.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:53 Transformer_SMD.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:54 Transformer_THT.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Transistor_Power.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:51 Transistor_Power_Module.pretty
4.0K drwxr-xr-x 2 root root 4.0K 2024-03-15 15:37:52 Valve.pretty
12K drwxr-xr-x 2 root root 12K 2024-03-15 15:37:54 Varistor.pretty
Describe the bug KiCad released new version "KiCad 7.0.0" on Feb/12/2023, skidl's part method call on KiCad-7.0.0 would result in KeyError: "F0"
To Reproduce Steps to reproduce the behavior:
Traceback (most recent call last): File "skidl101.py", line 7, in <module> r1, r2 = 2 * Part("Device", 'R', TEMPLATE, footprint='Resistor_SMD.pretty:R_0805_2012Metric') File "/Users/zhuoli/.pyenv/versions/3.6.15/lib/python3.6/site-packages/skidl/part.py", line 194, in __init__ part = lib[name].copy(dest=TEMPLATE) File "/Users/zhuoli/.pyenv/versions/3.6.15/lib/python3.6/site-packages/skidl/schlib.py", line 192, in get_part_by_name parts.parse(get_name_only) File "/Users/zhuoli/.pyenv/versions/3.6.15/lib/python3.6/site-packages/skidl/part.py", line 373, in parse parse_func(get_name_only) File "/Users/zhuoli/.pyenv/versions/3.6.15/lib/python3.6/site-packages/skidl/tools/kicad/kicad.py", line 297, in parse_lib_part _parse_lib_part_kicad_v6(self, get_name_only) File "/Users/zhuoli/.pyenv/versions/3.6.15/lib/python3.6/site-packages/skidl/tools/kicad/kicad.py", line 817, in _parse_lib_part_kicad_v6 self.ref_prefix = self.fields["F0"] # Part ref prefix (e.g., 'R'). KeyError: 'F0'
Expected behavior No error should raised from skidl's official example.
Screenshots
Desktop (please complete the following information):
Additional context The failure is brought by this merge with a hardcode logic to search part in kicad v6