-
Notifications
You must be signed in to change notification settings - Fork 199
Description
Environment (OS, Python version, PySpice version, simulator)
Manjaro17,python3.7.0,PySPice1.2, ngspice
and I tested in windows10,python3.6.1,pyspice1.2, vs_dll/ngspice.dll
same error
Expected Behaviour
run examples under the source directory "examples"
Actual Behaviour
AttributeError: 'NgSpiceShared' object has no attribute '_simulation_type'
Steps to reproduce the behaviour
Download the latest source code,go to directory "examples", run the file in terminal:
$ python run-examples
then the first error happened:
Traceback (most recent call last):
File "run-examples", line 36, in
for topic in os.listdir(examples_path):
FileNotFoundError: [Errno 2] No such file or directory: ''
I edit the source code in file "run-examples":
#examples_path = os.path.dirname(file)
examples_path = os.path.dirname(os.path.abspath(file))
and then another error happened:
Traceback (most recent call last):
File "operational-amplifier/astable.py", line 40, in
simulator = circuit.simulator(temperature=25, nominal_temperature=25)
File "/usr/lib/python3.7/site-packages/PySpice/Spice/Netlist.py", line 1296, in simulator
return CircuitSimulator.factory(self, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/PySpice/Spice/Simulation.py", line 708, in factory
return sub_cls(circuit, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/PySpice/Spice/NgSpice/Simulation.py", line 99, in init
self._ngspice_shared = NgSpiceShared.new_instance()
File "/usr/lib/python3.7/site-packages/PySpice/Spice/NgSpice/Shared.py", line 331, in new_instance
instance = cls(ngspice_id=ngspice_id, send_data=send_data)
File "/usr/lib/python3.7/site-packages/PySpice/Spice/NgSpice/Shared.py", line 350, in init
self._init_ngspice(send_data)
File "/usr/lib/python3.7/site-packages/PySpice/Spice/NgSpice/Shared.py", line 427, in _init_ngspice
self._simulation_type.time: u_s,
AttributeError: 'NgSpiceShared' object has no attribute '_simulation_type'
To continue press Enter