Feb-14-2024, 11:01 AM
Hello All,
Struggling with a basic and a much irritating bug in my code which utilizes the PySpice module.
I'm working on a Visual-Basic platform.
Here it is:
The
Thank you very much
Struggling with a basic and a much irritating bug in my code which utilizes the PySpice module.
I'm working on a Visual-Basic platform.
Here it is:
import PySpice.Logging.Logging as Logging logger = Logging.setup_logging() from PySpice.Spice.Netlist import Circuit, SubCircuit, SubCircuitFactory from PySpice.Unit import * class ParallelResistor(SubCircuitFactory): __name__ = 'parallel_resistor' __nodes__ = ('n1', 'n2') def __init__(self, R1=1@u_Ω, R2=2@u_Ω): super().__init__() self.R(1, 'n1', 'n2', R1) self.R(2, 'n1', 'n2', R2) circuit = Circuit('Test') circuit.subcircuit(ParallelResistor(R2=3@u_Ω)) circuit.X('1', 'parallel_resistor', 1, circuit.gnd) print(circuit)
The
{super().__init__()}
line produces the error: Error:__init__() argument after * must be an iterable, not NoneType
Any clues? Thank you very much