A community-maintained Python framework for creating mathematical animations.
fix write_subcaption_file error when using opengl renderer (#3546)
yuan175cb894003e
diff --git a/manim/scene/scene_file_writer.py b/manim/scene/scene_file_writer.pyindex f3e5c08a4..6d39cc35b 100644--- a/manim/scene/scene_file_writer.py+++ b/manim/scene/scene_file_writer.py@@ -725,6 +725,8 @@ class SceneFileWriter:def write_subcaption_file(self):"""Writes the subcaption file."""+ if config.output_file is None:+ returnsubcaption_file = Path(config.output_file).with_suffix(".srt")subcaption_file.write_text(srt.compose(self.subcaptions), encoding="utf-8")logger.info(f"Subcaption file has been written as {subcaption_file}")