Skip to content

matplotlib test use non-interactive agg backend #4168

Merged
shyuep merged 2 commits intomaterialsproject:masterfrom
DanielYang59:mpl-agg-backend
Nov 12, 2024
Merged

matplotlib test use non-interactive agg backend #4168
shyuep merged 2 commits intomaterialsproject:masterfrom
DanielYang59:mpl-agg-backend

Conversation

@DanielYang59
Copy link
Copy Markdown
Contributor

@DanielYang59 DanielYang59 commented Nov 12, 2024

Summary

The last, Agg, is a non-interactive backend that can only write to files. It is used on Linux, if Matplotlib cannot connect to either an X display or a Wayland display.

The names of builtin backends are case-insensitive; e.g., 'QtAgg' and 'qtagg' are equivalent.

The tk backend might emit intermittent failures like:

>       self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
E       _tkinter.TclError: invalid command name "tcl_findLibrary"

Or:

>       self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
E       _tkinter.TclError: Can't find a usable init.tcl in the following directories: 
E           C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6 C:/Users/runneradmin/micromamba/envs/lib/tcl8.6 C:/Users/runneradmin/micromamba/lib/tcl8.6 C:/Users/runneradmin/micromamba/envs/library C:/Users/runneradmin/micromamba/library C:/Users/runneradmin/micromamba/tcl8.6.13/library C:/Users/runneradmin/tcl8.6.13/library
E       
E       C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl: couldn't read file "C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl": No error
E       couldn't read file "C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl": No error
E           while executing
E       "source C:/Users/runneradmin/micromamba/envs/pmg/Library/lib/tcl8.6/init.tcl"
E           ("uplevel" body line 1)
E           invoked from within
E       "uplevel #0 [list source $tclfile]"
E       
E       
E       This probably means that Tcl wasn't installed properly.

@DanielYang59 DanielYang59 marked this pull request as ready for review November 12, 2024 09:13
@shyuep shyuep merged commit d302920 into materialsproject:master Nov 12, 2024
@DanielYang59 DanielYang59 deleted the mpl-agg-backend branch November 13, 2024 01:43
bilke added a commit to ufz/ogstools that referenced this pull request Jan 22, 2025
Fixes FAILED tests/test_plot.py::TestPlotting::test_save_animation - _tkinter.TclError: invalid command name "tcl_findLibrary"

See e.g. materialsproject/pymatgen#4168
bilke added a commit to ufz/ogstools that referenced this pull request Jul 8, 2025
Fixes FAILED tests/test_plot.py::TestPlotting::test_save_animation - _tkinter.TclError: invalid command name "tcl_findLibrary"

See e.g. materialsproject/pymatgen#4168
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.

2 participants