File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,8 +172,9 @@ def from_sexpr(cls, exp: list) -> SymbolPin:
172172 object .number = item [1 ]
173173 if len (item ) > 2 :
174174 object .numberEffects = Effects ().from_sexpr (item [2 ])
175- elif item [0 ] == "alternate" :
176- object .alternatePins .append (SymbolAlternativePin ().from_sexpr (item ))
175+ elif item [0 ] == "alternate_pins" :
176+ for ap in item [1 :]:
177+ object .alternatePins .append (SymbolAlternativePin ().from_sexpr (ap ))
177178 else :
178179 raise ValueError (f"Unrecognized property key: { item [0 ]} , exp: { exp } " )
179180
@@ -690,7 +691,12 @@ def from_sexpr(cls, exp: list) -> SymbolLib:
690691 elif item [0 ] == "generator_version" :
691692 object .generator_version = item [1 ]
692693 elif item [0 ] == "symbol" :
693- object .symbols .append (Symbol ().from_sexpr (item ))
694+ try :
695+ object .symbols .append (Symbol ().from_sexpr (item ))
696+ except Exception as e :
697+ print (
698+ f"Error loading symbol { item [1 ] if item [1 ] else 'Missing symbol ID' } with exception: { e } "
699+ )
694700 elif item [0 ] == "embedded_fonts" :
695701 object .embedded_fonts = item [1 ]
696702 else :
You can’t perform that action at this time.
0 commit comments