TousstNicolas / JLC2KiCad_lib

JLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.
MIT License
228 stars 42 forks source link

some components corrupt the kicad_sym file without error #30

Closed cmteuffel closed 1 year ago

cmteuffel commented 1 year ago

Describe the bug The parts C294679 and C17408 can be converted without error if they are put into different libraries. If they are in the same library then the library gets corrupted even though the import runs without error. If you open the schematic editor and try to add a component, kicad is showing the error "invalid symbol unit name prefix" . The error is shown only the first time when the symbol library is loaded. Kicad has to be closed and started again to see the error again. The order of the insertion is irrelevant. In combination with other components such as C84259, the error occurs only if the other component is converted last. The cause of the error is a missing brace that closes the previous symbol tag.

To Reproduce Works as intended: JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib JLC2KiCadLib C294679 -dir My_lib_B -schematic_lib My_Schematic_lib

Also works as intended (C84259 component first): JLC2KiCadLib C84259 C17408 -dir My_lib_A -schematic_lib My_Schematic_lib JLC2KiCadLib C84259 C294679 -dir My_lib_B -schematic_lib My_Schematic_lib

Corrupts .kicad_sym file: JLC2KiCadLib C17408 C294679 -dir My_lib_A -schematic_lib My_Schematic_lib

Also corrupts .kicad_sym file: JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib JLC2KiCadLib C294679 -dir My_lib_A -schematic_lib My_Schematic_lib

Also corrupts .kicad_sym file (reverse insertion order): JLC2KiCadLib C294679 -dir My_lib_A -schematic_lib My_Schematic_lib JLC2KiCadLib C17408 -dir My_lib_A -schematic_lib My_Schematic_lib

Also corrupts .kicad_sym file (C84259 component last): JLC2KiCadLib C17408 C84259 -dir My_lib_A -schematic_lib My_Schematic_lib JLC2KiCadLib C294679 C84259 -dir My_lib_B -schematic_lib My_Schematic_lib

Expected behavior Loading the symbol library without error

TousstNicolas commented 1 year ago

This error must be caused by https://github.com/TousstNicolas/JLC2KiCad_lib/commit/e815ded7b42b84d4801443c6aa126c072b2591a8 and the following one. I thought I corrected it but it seems like it didn't.

As a temporary fix, you can go back before https://github.com/TousstNicolas/JLC2KiCad_lib/commit/3920e1ff374599895b2034e14e00f5258b73f968 and it should work fine.

Thank you for reporting this issue.

TousstNicolas commented 1 year ago

Should be fixed, I will let you close this issue if you don't find any other issues.