forked from PySpice-org/PySpice
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi,
I would like to use ngspice 44 with pyspice.
I'm trying to run examples and I run into this kind of problems:
python spice-parser/bootstrap-example.py
2025-02-05 10:34:49,149 - PySpice.Doc.ExampleTools.find_libraries - INFO - SPICE library path is /workspaces/PySpice/examples/spice-library
2025-02-05 10:34:49,149 - PySpice.Spice.Library.Library.Library.__init__ - INFO - Initialize library...
2025-02-05 10:34:49,149 - PySpice.Spice.Library.Library.Library.scan - INFO - Scan /workspaces/PySpice/examples/spice-library...
2025-02-05 10:34:49,149 - PySpice.Spice.Library.SpiceInclude.SpiceInclude.load_yaml - INFO - Load /workspaces/PySpice/examples/spice-library/discrete-semiconductors/transistors/ptm_65nm_pmos_bulk.yaml
2025-02-05 10:34:49,150 - PySpice.Spice.Library.SpiceInclude.SpiceInclude.load_yaml - INFO - Load /workspaces/PySpice/examples/spice-library/discrete-semiconductors/transistors/ptm_65nm_nmos_bulk.yaml
2025-02-05 10:34:49,151 - PySpice.Spice.Library.SpiceInclude.SpiceInclude.load_yaml - INFO - Load /workspaces/PySpice/examples/spice-library/discrete-semiconductors/transistors/2N2222A.yaml
2025-02-05 10:34:49,152 - PySpice.Spice.Library.SpiceInclude.SpiceInclude.parse - INFO - Parse /workspaces/PySpice/examples/spice-library/discrete-semiconductors/transistors/MOSFET/irf150.lib
line=[22:22] ELEMENT / CONTROL COMMAND
M1 9 7 8 8 MM L=100u W=100u ; ast=M1 9 7 8 8 MM L=100u W=100u first_set_position=5
ElementData.elements=dict_keys([])
self._letter=M
Traceback (most recent call last):
File "/workspaces/PySpice/examples/spice-parser/bootstrap-example.py", line 27, in <module>
spice_library = SpiceLibrary(libraries_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Library/Library.py", line 87, in __init__
self.scan()
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Library/Library.py", line 172, in scan
self._handle_library(path)
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Library/Library.py", line 177, in _handle_library
spice_include = SpiceInclude(path)
^^^^^^^^^^^^^^^^^^
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Library/SpiceInclude.py", line 278, in __init__
self.parse()
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Library/SpiceInclude.py", line 365, in parse
spice_file = SpiceFile(self._path)
^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Parser/HighLevelParser.py", line 1278, in __init__
self.parse_file(path)
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Parser/HighLevelParser.py", line 1167, in parse_file
self._parse()
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Parser/HighLevelParser.py", line 1152, in _parse
self.analyse()
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Parser/HighLevelParser.py", line 1102, in analyse
obj = cls(line, ast)
^^^^^^^^^^^^^^
File "/workspaces/PySpice/pyspicedev-env/lib/python3.11/site-packages/PySpice-1.6-py3.11.egg/PySpice/Spice/Parser/HighLevelParser.py", line 319, in __init__
data = ElementData.elements[self._letter]
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'M'
I haven't any idea how to fix this.
Could you help me out?
Best
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels