Closed MrSurly closed 5 years ago
Your issue is related with some behavior of your XML file. Debugging, after KiCost group the part, it return:
... ['D301', 'D302'] D301 {'libpart': 'device:D', 'manf#_qty': '1', 'value': 'BAS16GWJ', 'manf#': 'BAS16GWJ', 'spn': '1727-7320-2-ND', 'manf': 'Nexperia USA Inc.', 'footprint': 'Diodes_SMD:D_SOD-123'} D302 {'libpart': 'device:D', 'manf#_qty': '1', 'value': 'BAS16GWJ', 'manf#': 'BAS16GWJ', 'spn': '1727-7320-2-ND', 'manf': 'Nexperia USA Inc.', 'footprint': 'Diodes_SMD:D_SOD-123'} [] [] ['J9'] J9 {'digikey#_qty': '1', 'libpart': 'conn:Conn_01x02', 'manf#_qty': '1', 'value': 'B2B-PH-SM4-TB(LF)(SN)', 'digikey#': '455-1734-2-ND', 'manf': 'JST', 'manf#': 'B2B-PH-SM4-TB(LF)(SN)', 'spr': 'digikey', 'footprint': 'Connectors_JST:JST_PH_B2B-PH-SM4-TB_02x2.00mm_Straight'} ...
The []
means two empty groups of components. I never saw this behavior before, could you provide more information of your schematic? (If used some not conventional filed in the parts, KiCad version and the "Edit table field" list).
I am trying to track this behavior.
This issue appear to be created because the group algorithm and component without digikey#
field.
The error just appear when Digikey distributor is active generating the empty groups.
I do a fair amount of Python -- Is this something I could dig into, or is it pretty involved? Maybe give me a few hints around where these hooks are?
The problem is in the group_parts()
function in the file eda_tools.py
, need some correcting / re-manufacture. And I need to merge here the #266.
It is a function to group the the parts and propagate the the manf#
/ digikey#
/ ... to the semi-identical part (by default KiCost propagate the manf#
to parts of same kind, footprint and value, that are empty).
All help and new developers are welcome.
KiCost works in this sequence:
manf#
(the function here, where is the issue);I am hitting this bug. Are there any work-arounds for this?
This bug are not present on new implementation #314 (will be released in few days). If you would like to have a try, replace the current code installation by https://github.com/xesscorp/KiCost/tree/octopart
Re-open the discussion if the bug persists.
I pulled the fix for #302.
I instrumented the code in spreadsheet.py, added a debug breakpoint:
In this case,
part.collapsed_refs
is an empty string (i.e.repr(part.collapsed_refs)
yields''
).main.zip