Skip to content

Commit 4a6e126

Browse files
committed
Log import failure tracebacks during backend autodetection fallback.
This should help troubleshooting backend autodetection issues.
1 parent 4946ac3 commit 4a6e126

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ def switch_backend(newbackend: str) -> None:
429429
try:
430430
switch_backend(candidate)
431431
except ImportError:
432+
_log.debug("Skipping backend candidate %r as loading failed.",
433+
candidate, exc_info=True)
432434
continue
433435
else:
434436
rcParamsOrig['backend'] = candidate

0 commit comments

Comments
 (0)