Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #352 #353

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix #352 #353

wants to merge 6 commits into from

Conversation

cyber-g
Copy link
Contributor

@cyber-g cyber-g commented Sep 25, 2023

NGSpice has changed the structure of its output (on 2021-01-01 and 2022-03-14) ; please read #352 (comment) for more info.

There is a mismatch between what is expected in PySpice and the actual output.
_read_header() is in charge of processing the output from NGSpice.

This PR implements a fix that addresses the new possible structures of the output of NGSpice.
It considers that the output can have three formats which can happen depending on the host linux distribution:

  • NGSpice before 2021-01-01 : nothing before "Circuit:"
  • NGSpice between 2021-01-01 and 2022-03-14 : a message is present before "Circuit:"
  • NGSpice after 2022-03-14 : the message present before "Circuit:" begins with "Note:"

@cyber-g
Copy link
Contributor Author

cyber-g commented Sep 25, 2023

Does anyone know how to fix CodeQL / Analyze (cpp) (pull_request) Failing after ... ?
image

cyber-g added 2 commits May 3, 2024 02:40
… an unexpected keyword argument 'basey'

Error :

Traceback (most recent call last):
  File "***/PySpice/examples/diode/diode-characteristic-curve.py", line 187, in <module>
    ax2.semilogy(analysis.out, static_resistance, basey=10)
  File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axes/_axes.py", line 1958, in semilogy
    self.set_yscale('log', **d)
  File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 73, in wrapper
    return get_method(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axis.py", line 837, in _set_axes_scale
    ax._axis_map[name]._set_scale(value, **kwargs)
  File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/axis.py", line 796, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "***/pyspice3.11-venv/lib/python3.11/site-packages/matplotlib/scale.py", line 717, in scale_factory
    return scale_cls(axis, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: LogScale.__init__() got an unexpected keyword argument 'basey'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant