Error loading Schematic File - Invalid Component Line

Was trying to export a BOM yesterday using the BOMs-Away python plugin. Now I think maybe that wasn’t a good idea because when I went to open the schematic file this morning, I’m getting this error:

Annotation 2020-04-14 093309

I’m using KiCad version (5.1.5)-3, release build.

Here are lines 124 - 130 of the schematic. Line 131 is the last blank line in the file.

L Regulator_Switching:R-78E5.0-0.5 U2
U 1 1 5E0A1534
P 1700 4000
F 0 "U2" H 1700 4242 50 0000 C CNN
F 1 "R-78E5.0-0.5" H 1700 4151 50 0000 C CNN
F 2 "Converter_DCDC:Converter_DCDC_RECOM_R-78E-0.5_THT" H 1750 3750 50 0001 L CIN
F 3 "https://www.recom-power.com/pdf/Innoline/R-78Exx-0.5.pdf" H 1700 4000 50 0001 C CNN

Any ideas what’s wrong?

The file is probably missing the last lines althother. Compare the last “component” (symbol) with other symbols in that file. There should be at least

$EndComp

Yeah, added the following and now the schematic opens.

$EndComp
$EndSCHEMATC

Unfortunately basically my entire schematic is gone. Luckily I took a screenshot of it before doing any BOM generation so I can recreate it, but very frustrating and time consuming.

My guess is that BOMs-Away hasn’t been updated in years and isn’t compatible with this version of KiCad. So it screwed up the schematic file when it saved back the component information I added in the BOM.

Does this make sense?

Also, long shot but is there any way to save the schematic?

Yes.

Check if there’s .sch-bak file in the project.

There was. Thanks for the help!

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