From 85bbe0b0948d8f4d30e0416ce374322fddb69994 Mon Sep 17 00:00:00 2001 From: Normann Date: Tue, 14 Jan 2025 13:27:51 +0100 Subject: [PATCH] fix for #375 (#377) * fix for #375 * comment --- src/akkudoktoreos/utils/visualize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/akkudoktoreos/utils/visualize.py b/src/akkudoktoreos/utils/visualize.py index 35877ab3..3c63ab38 100644 --- a/src/akkudoktoreos/utils/visualize.py +++ b/src/akkudoktoreos/utils/visualize.py @@ -5,6 +5,7 @@ from collections.abc import Sequence from typing import Callable, Optional, Union +import matplotlib import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np @@ -17,6 +18,9 @@ from akkudoktoreos.utils.datetimeutil import to_datetime logger = get_logger(__name__) +matplotlib.use( + "Agg" +) # non-interactive backend that can only write to files, backend needed to stay in main thread. class VisualizationReport(ConfigMixin):