Broken in CI for Current Matplotlib Master
ianhi opened this issue · 1 comments
Part of my tests run with matplotlib installed from git. These tests run on on github actions for every PR and also every monday. A PR today (https://github.com/ianhi/mpl-interactions/runs/2243020048?check_suite_focus=true) failed with this error from inside pytest-mpl:
This pulls in (https://github.com/matplotlib/matplotlib/tree/a738d78deaf2e324dd71fc1877446a51f8fa6bc7)
platform linux -- Python 3.9.2, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/_pytest/main.py", line 267, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/_pytest/terminal.py", line 712, in pytest_sessionstart
INTERNALERROR> lines = self.config.hook.pytest_report_header(
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/pytest_mpl/plugin.py", line 124, in pytest_report_header
INTERNALERROR> import matplotlib
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 840, in <module>
INTERNALERROR> rcParamsDefault = _rc_params_in_file(
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 774, in _rc_params_in_file
INTERNALERROR> config[key] = val # try to convert to proper type or raise
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.9.2/x64/lib/python3.9/site-packages/matplotlib/__init__.py", line 608, in __setitem__
INTERNALERROR> raise ValueError(f"Key {key}: {ve}") from None
INTERNALERROR> ValueError: Key backend: '' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
however the same workflow ran just fine on monday: https://github.com/ianhi/mpl-interactions/runs/2220148653?check_suite_focus=true which ran matplotlib version: matplotlib-3.3.4.post2680+ge6fd9012d
So perhaps something seems to have changed in the matplotlib backend choosing code that is not playing happily with how pytest-mpl is setting the backend/rcparams?
This has been fixed upstream in matplotlib
dev.