I am trying to use the Spicelib to run an LTSpice simulation in Python. This worked well when I did it with a small built-in circuit, but now currently I would like to make it work with more complex schematics, and it gave me this error:
NotImplementedError Traceback (most recent call last)
32 #Simulator and circuit definition
---> 33 circuit = AscEditor(input_loc)
34 LTC = SimRunner(output_folder=output_loc, simulator=LTspice)
spicelibeditorasc_editor.py:128, in AscEditor.__init__(self, asc_file)
126 raise FileNotFoundError(f"File {asc_file} not found")
127 # read the file into memory
--> 128 self.reset_netlist()
spicelibeditorasc_editor.py:245, in AscEditor.reset_netlist(self, create_blank)
243 self.sheet = line[len("SHEET "):].strip()
244 else:
--> 245 raise NotImplementedError("Primitive not supported for ASC filen"
246 f'"{line}"')
247 if component is not None:
248 assert component.reference is not None, "Component InstName was not given"
NotImplementedError: Primitive not supported for ASC file
"LINE Normal 368 -1088 368 -1088 2
It says there is an error with the primitives and yes, there are two elements that are not found in the LTSpice’s library and they are called with the .model command. I think it can’t import them but I don’t know why.
Do you have any solutions, how can I overcome this?
Thanks
Varga Bence is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.