Skip to content

Commit 7fd7623

Browse files
authored
Fix: Incorrectly handles stderr outputs that aren't errors from libngspice version 43
**Fixes #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`.
1 parent fe08718 commit 7fd7623

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: PySpice/Spice/NgSpice/Shared.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ def _send_char(message_c, ngspice_id, user_data):
620620
self._stderr.append(content)
621621
if content.startswith('Warning:'):
622622
func = self._logger.warning
623-
# elif content.startswith('Warning:'):
623+
elif content.startswith('Using'): # Ignore "Using ... as Direct Linear Solver" messages
624+
func = self._logger.debug
624625
else:
625626
self._error_in_stderr = True
626627
func = self._logger.error

0 commit comments

Comments
 (0)