-
Notifications
You must be signed in to change notification settings - Fork 179
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
Incorrectly handles stderr outputs that aren't errors from libngspice version 43 #379
Comments
ah yes, I have the same issue... is this a ngspice bug? Why do they do this on stderr instead of stdout, is there any reason? |
…spice version 43 **Fixes PySpice-org#379** This pull request addresses an issue where PySpice incorrectly handles certain stderr outputs from libngspice version 43, specifically messages like "Using SPARSE 1.3 as Direct Linear Solver". These messages, while appearing on stderr, are informational and not indicative of errors. **Changes:** - Modified the `_send_char` callback in `Spice/NgSpice/Shared.py` to specifically handle messages starting with "Using". - These messages are now treated as debug output instead of errors, preventing the `self._error_in_stderr` flag from being set and avoiding the `NgSpiceCommandError`.
I agree it's odd that they print that info statement to stderr. However it looks that PySpice doesn't (want to?) support I got around the issue by compiling |
Environment (OS, Python version, PySpice version, simulator)
Issue
I installed
libngspice
viabrew install libngspice
, which gave libngspice version 43. I am trying to run this code:On running this, I get the error:
It seems that the error is due to the handling of stderr in
Spice/NgSpice/Shared.py
(around line 625). When anything appears in stderr that does not begin with'Warning:'
,self._error_in_stderr
is set to True, causing anNgSpiceCommandError
to be raised here. It appears that the latest version of libngspice can outputUsing SPARSE 1.3 as Direct Linear Solver
to stderr, which leads to simulator crashing despite no actual error appearing in stderr.If I comment out the line 625 setting
self._error_in_stderr = True
, then the simulation completes with no issues.The text was updated successfully, but these errors were encountered: