Closed scandey closed 3 years ago
Two additions from this morning: I updated to development branch (ad31dbb) and it runs fine now (thank you for those quick fixes to the dependencies!). This bug still remains though.
I've tried with and without grouping, in both cases C6 appears to be interpreted incorrectly.
I did catch other corruptions this morning, so the first extraction/insertion didn't work perfectly after all. It doesn't seem to be limited to capacitors.
I reverted my schematic back to before the first use of KiField and I'm repeating changes individually from that point.
Extraction from that schematic now correctly associates components together, but weirdly, it doesn't extract all the fields. Notably the Value and Footprint fields are not extracted. This may be an unrelated bug. All user created fields that previously existed are included in the csv, but none of the default ones.
Next step is to revert to 0.1.17 and check if that specific behavior continues (to identify if it is a bug with the development branch or an issue with a corrupted schematic).
Update: 0.1.17 does include the footprint and value fields, so there is an issue with development branch failing to see the default fields. When running Kifield in debug mode I note that it is just missing the fields entirely upon extract:
> {'C1': {'Comments': '~',
'Descriptions': '0.01uF 10% 50V Ceramic Capacitor 0805',
'EM_MFR': '~',
'EM_MFR_PN': '~',
'EM_value': '~',
'MFR': 'AVX',
'MFR_PN': '~',
'PN': 'CDR31BX103AKUS'}
For whatever its worth, I'm happy to privately send the schematic I'm working on if that would be helpful in debugging, but unfortunately I can't post it publicly.
Yes, the 0.1.18 is failing to handle the default fields correctly. I'm working on it now. I hope to have a fix soon. I hope you've been using the backup feature and didn't corrupt your design!
Yes, the 0.1.18 is failing to handle the default fields correctly. I'm working on it now. I hope to have a fix soon. I hope you've been using the backup feature and didn't corrupt your design!
Nothing permanent, just restored the schematic in git to before the first use of KiField (and I can reconstruct the changes made after that).
I'm still not sure what caused the component corruption though, so I will proceed with 0.1.17 like last night, just keeping very careful track of component values. Thank you for all your work on this tool!
Slowly isolating whats going on: it looks like this issue only affect parts that were copied and pasted. Looking deeper into my schematic, this is definitely a me problem, not a KiField problem. (Not a surprise at all!) I think I copied and pasted some low level hierarchical schematic files at some point and deleted the original, which started this whole problem.
For other 5.1.10 users, if your schematic file looks like this with static component references and extra AR Path lines that shouldn't be there, clearing all annotations and resetting them worked for me. It is pain to change comments and whatnot but it seems to have fixed the issue, allowing KiField to work properly.
$Comp
L ESP_Passives:C C59
U 1 1 5FF7F864
P 9250 6200
AR Path="/5FF2A63B/5FF4CFFF/5FF7F864" Ref="C59" Part="1"
AR Path="/5FF2A63B/5FF47B16/5FF7F864" Ref="C69" Part="1"
AR Path="/5FF2A63B/5FF48555/5FF7F864" Ref="C?" Part="1"
AR Path="/5FF2A63B/5FF4902A/5FF7F864" Ref="C?" Part="1"
AR Path="/5FF2A63B/60099BA5/5FF7F864" Ref="C85" Part="1"
AR Path="/5FF2A63B/60099BAB/5FF7F864" Ref="C95" Part="1"
AR Path="/5FF2A63B/61180680/611D92D4/5FF7F864" Ref="C?" Part="1"
AR Path="/5FF2A63B/61180680/611D92DA/5FF7F864" Ref="C91" Part="1"
AR Path="/5FF2A63B/613479F3/611D92DA/5FF7F864" Ref="C148" Part="1"
F 0 "C148" V 9502 6200 50 0000 C CNN
F 1 "0.1uF" V 9411 6200 50 0000 C CNN
F 2 "1210" H 9288 6050 50 0001 C CNN
F 3 "~" H 9250 6200 50 0001 C CNN
F 4 "~" H 9400 6400 50 0001 C CNN "Comments"
F 5 "0.1uF 10% 50V Ceramic Capacitor 1210" H 9400 6400 50 0001 C CNN "Descriptions"
F 6 "~" H 9400 6400 50 0001 C CNN "EM_MFR"
F 7 "~" H 9400 6400 50 0001 C CNN "EM_MFR_PN"
F 8 "~" H 9400 6400 50 0001 C CNN "EM_value"
F 9 "AVX" H 9400 6400 50 0001 C CNN "MFR"
F 10 "~" H 9400 6400 50 0001 C CNN "MFR_PN"
F 11 "CDR33BX104AKUS" H 9400 6400 50 0001 C CNN "PN"
1 9250 6200
0 -1 -1 0
$EndComp
I'm not sure it's your problem. I definitely have an error in KiField. I've fixed it for all but one integration test. Still working on it.
Hm.. everything seems to have worked for me after complete re-annotation. I will keep looking to make sure that is actually the case.
I mean, we definitely saw it failing to extract the default fields, right? And that happened with my circuit which is completely separate from yours.
Oh! Sorry, there are two issues here. I should have split the default values issue in development branch into a separate issue. That is not resolved.
I've been working on 0.1.17 today, trying to identify what about my schematic was causing KiField to collect items that seemed totally unrelated into the same line item. That issue seems to be due to my confused schematic files, which was fixed by fully re-annotating.
Ah, OK.
I pushed my fixes to the development branch. Give it a try sometime and let me know if it works OK for you. I still have some other issues to address before releasing on PyPi.
It works for me! Thank you so much.
Describe the bug When extracting from a complex circuit KiField will sometimes collect unrelated components into a line item. The issue appears to be during extraction, some components are just extracted from schematic incorrectly and silently.
To Reproduce Steps to reproduce the behavior:
From debugging in running KiField:
From relevant portion of the schematic:
Expected behavior Components from schematic files are correctly grouped
Desktop (please complete the following information):
Additional context
Bizarrely, extraction and insertion worked perfectly once on this schematic earlier this evening, but since then any attempt at extraction leads to broken output. Makes me wonder if the earlier insertion broke something subtly in the schematic files.See below, the extraction and insertion issue may be specific to this schematic.