Skip to content

Commit f55c3f1

Browse files
authored
Backport PR matplotlib#31722: Log import failure tracebacks during backend autodetection fallback. (matplotlib#31729)
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2 parents 6eed96a + 1de2142 commit f55c3f1

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
@@ -427,6 +427,8 @@ def switch_backend(newbackend: str) -> None:
427427
try:
428428
switch_backend(candidate)
429429
except ImportError:
430+
_log.debug("Skipping backend candidate %r as loading failed.",
431+
candidate, exc_info=True)
430432
continue
431433
else:
432434
rcParamsOrig['backend'] = candidate

0 commit comments

Comments
 (0)