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
Larz60+ write Feb-15-2024, 11:05 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.