PySpice
PySpice copied to clipboard
LosslessTransmissionLine cannot be cloned
Environment (OS, Python version, PySpice version, simulator)
Linux, 3.8.10, 1.5, irrelevant
Expected Behaviour
Clone a circuit
Actual Behaviour
NameError: Either TD or F, NL must be specified
Steps to reproduce the behaviour
circuit = Circuit("title")
circuit.LosslessTransmissionLine('A', circuit.gnd, circuit.gnd, circuit.gnd, circuit.gnd,
impedance=50@u_Ohm, frequency=6@u_GHz, normalized_length=0.25)
circuit_capa.clone()
Try this patch. I think it should resolve the issue. I have a feeling this may be a bug throughout the codebase.
https://github.com/FabriceSalvaire/PySpice/pull/309/commits/896bfc3f43636dab53e655d25dac3fd56875d499
I did a quick search through the codebase. This appears to be the only instance of the bug. I cooked up a cleaner fix here. I would patch it on top of the previous commit.
50d2b954442ea2dcfd8b6d2a9f4daa696b3ef3ed