![]() |
A troublesome error (PySpice) - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: A troublesome error (PySpice) (/thread-41595.html) |
A troublesome error (PySpice) - assafpeled - Feb-14-2024 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: 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: Any clues? Thank you very much |