in simulation/decai/simulation/simulate.py [0:0]
def save_plot_image(self, plot, plot_save_path):
try:
export_png(plot, filename=plot_save_path)
except Exception as e:
if self._warned_about_saving_plot:
return
show_error_details = True
message = "Could not save picture of the plot."
try:
# Check if in WSL.
show_error_details = not ('microsoft' in uname().release.lower())
except:
pass
if show_error_details:
self._logger.exception(message, exc_info=e)
else:
self._logger.warning(f"{message} %s", e)
self._warned_about_saving_plot = True