bmaltais / kohya_ss

Apache License 2.0
9.6k stars 1.24k forks source link

ValueError: Key backend: 'module://matplotlib_inline.backend_inline' is not a valid value for backend #2521

Open lawliet198t opened 5 months ago

lawliet198t commented 5 months ago

Traceback (most recent call last): File "/workspace/all_data/kohya_ss/venv/lib/python3.10/site-packages/gradio/queueing.py", line 527, in process_events response = await route_utils.call_process_api( File "/workspace/all_data/kohya_ss/venv/lib/python3.10/site-packages/gradio/route_utils.py", line 260, in call_process_api with utils.MatplotlibBackendMananger(): File "/workspace/all_data/kohya_ss/venv/lib/python3.10/site-packages/gradio/utils.py", line 948, in enter import matplotlib File "/workspace/all_data/kohya_ss/venv/lib/python3.10/site-packages/matplotlib/init.py", line 1270, in rcParams['backend'] = os.environ.get('MPLBACKEND') File "/workspace/all_data/kohya_ss/venv/lib/python3.10/site-packages/matplotlib/init.py", line 738, in setitem raise ValueError(f"Key {key}: {ve}") from None ValueError: Key backend: 'module://matplotlib_inline.backend_inline' is not a valid value for backend; supported values are ['gtk3agg', 'gtk3cairo', 'gtk4agg', 'gtk4cairo', 'macosx', 'nbagg', 'notebook', 'qtagg', 'qtcairo', 'qt5agg', 'qt5cairo', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wxagg', 'wxcairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']

joshuacwnewton commented 4 months ago

This issue is specific to Jupyter notebooks. And, pip install matplotlib-inline should fix this issue. :)