You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Work properly, perhaps at least without sound with GUI.
How to reproduce the issue
Code for reproducing the problem
frommanimimport*frommanim_voiceoverimportVoiceoverScenefrommanim_voiceover.services.gttsimportGTTSServiceclassGTTSExample(VoiceoverScene):
defconstruct(self):
self.interactive_embed()
self.set_speech_service(GTTSService(lang="en", tld="com"))
circle=Circle()
square=Square().shift(2*RIGHT)
withself.voiceover(text="This circle is drawn as I speak.") astracker:
self.play(Create(circle), run_time=tracker.duration)
withself.voiceover(text="Let's shift it to the left 2 units.") astracker:
self.play(circle.animate.shift(2*LEFT), run_time=tracker.duration)
withself.voiceover(text="Now, let's transform it into a square.") astracker:
self.play(Transform(circle, square), run_time=tracker.duration)
withself.voiceover(text="Thank you for watching."):
self.play(Uncreate(circle))
self.wait()
# Use GTTS with another language:classGTTSExampleVietnamese(VoiceoverScene):
defconstruct(self):
self.interactive_embed()
# Set the lang argument to another language code.self.set_speech_service(GTTSService(lang="vi"))
circle=Circle()
square=Square().shift(2*RIGHT)
withself.voiceover(text="Vòng tròn này được vẽ khi tôi nói.") astracker:
self.play(Create(circle), run_time=tracker.duration)
withself.voiceover(text="Hãy chuyển nó sang bên trái 2 đơn vị.") astracker:
self.play(circle.animate.shift(2*LEFT), run_time=tracker.duration)
withself.voiceover(
text="Bây giờ hãy biến nó thành một hình vuông."
) astracker:
self.play(Transform(circle, square), run_time=tracker.duration)
withself.voiceover(text="Cảm ơn vì đã xem."):
self.play(Uncreate(circle))
self.wait()
Additional media files
Images/GIFs
Logs
Terminal output
$ manim -pql scene.py GTTSExample --renderer=opengl --enable_gui --disable_caching
Manim Community v0.17.3
Python 3.11.2 (main, May 30 2023, 17:45:26) [GCC 12.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/hypatia/.local/lib/python3.11/site-packages/manim/cli/render/commands. │
│ py:97 in render │
│ │
│ 94 │ │ │ │ for SceneClass in scene_classes_from_file(file): │
│ 95 │ │ │ │ │ with tempconfig({}): │
│ 96 │ │ │ │ │ │ scene = SceneClass(renderer) │
│ ❱ 97 │ │ │ │ │ │ rerun = scene.render() │
│ 98 │ │ │ │ │ if rerun or config["write_all"]: │
│ 99 │ │ │ │ │ │ renderer.num_plays = 0 │
│ 100 │ │ │ │ │ │ continue │
│ │
│ /home/hypatia/.local/lib/python3.11/site-packages/manim/scene/scene.py:233 │
│ in render │
│ │
│ 230 │ │ │ return True │
│ 231 │ │ self.tear_down() │
│ 232 │ │ # We have to reset these settings in case of multiple renders │
│ ❱ 233 │ │ self.renderer.scene_finished(self) │
│ 234 │ │ │
│ 235 │ │ # Show info only if animations are rendered or to get image │
│ 236 │ │ if ( │
│ │
│ /home/hypatia/.local/lib/python3.11/site-packages/manim/renderer/opengl_rend │
│ erer.py:483 in scene_finished │
│ │
│ 480 │ │ # When num_plays is 0, no images have been output, so output a │
│ 481 │ │ # image in this case │
│ 482 │ │ if self.num_plays > 0: │
│ ❱ 483 │ │ │ self.file_writer.finish() │
│ 484 │ │ elif self.num_plays == 0 and config.write_to_movie: │
│ 485 │ │ │ config.write_to_movie = False │
│ 486 │
│ │
│ /home/hypatia/.local/lib/python3.11/site-packages/manim/scene/scene_file_wri │
│ ter.py:468 in finish │
│ │
│ 465 │ │ │ target_dir = self.image_file_path.parent / self.image_file │
│ 466 │ │ │ logger.info("\n%i images ready at %s\n", self.frame_count, │
│ 467 │ │ if self.subcaptions: │
│ ❱ 468 │ │ │ self.write_subcaption_file() │
│ 469 │ │
│ 470 │ def open_movie_pipe(self, file_path=None): │
│ 471 │ │ """ │
│ │
│ /home/hypatia/.local/lib/python3.11/site-packages/manim/scene/scene_file_wri │
│ ter.py:729 in write_subcaption_file │
│ │
│ 726 │ │
│ 727 │ def write_subcaption_file(self): │
│ 728 │ │ """Writes the subcaption file.""" │
│ ❱ 729 │ │ subcaption_file = Path(config.output_file).with_suffix(".srt") │
│ 730 │ │ subcaption_file.write_text(srt.compose(self.subcaptions), enco │
│ 731 │ │ logger.info(f"Subcaption file has been written as {subcaption_ │
│ 732 │
│ │
│ /usr/lib/python3.11/pathlib.py:872 in __new__ │
│ │
│ 869 │ def __new__(cls, *args, **kwargs): │
│ 870 │ │ if cls is Path: │
│ 871 │ │ │ cls = WindowsPath if os.name == 'nt' else PosixPath │
│ ❱ 872 │ │ self = cls._from_parts(args) │
│ 873 │ │ if not self._flavour.is_supported: │
│ 874 │ │ │ raise NotImplementedError("cannot instantiate %r on your │
│ 875 │ │ │ │ │ │ │ │ │ % (cls.__name__,)) │
│ │
│ /usr/lib/python3.11/pathlib.py:510 in _from_parts │
│ │
│ 507 │ │ # We need to call _parse_args on the instance, so as to get t │
│ 508 │ │ # right flavour. │
│ 509 │ │ self = object.__new__(cls) │
│ ❱ 510 │ │ drv, root, parts = self._parse_args(args) │
│ 511 │ │ self._drv = drv │
│ 512 │ │ self._root = root │
│ 513 │ │ self._parts = parts │
│ │
│ /usr/lib/python3.11/pathlib.py:494 in _parse_args │
│ │
│ 491 │ │ │ if isinstance(a, PurePath): │
│ 492 │ │ │ │ parts += a._parts │
│ 493 │ │ │ else: │
│ ❱ 494 │ │ │ │ a = os.fspath(a) │
│ 495 │ │ │ │ if isinstance(a, str): │
│ 496 │ │ │ │ │ # Force-cast str subclasses to str (issue #21127) │
│ 497 │ │ │ │ │ parts.append(str(a)) │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: expected str, bytes or os.PathLike object, not NoneType
System specifications
System Details
OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 23
RAM: 16GB
Python version (python/py/python3 --version): Python 3.11.2
Description of bug / unexpected behavior
GTTR example rashes when using OpenGL with GUI.
Expected behavior
Work properly, perhaps at least without sound with GUI.
How to reproduce the issue
Code for reproducing the problem
Additional media files
Images/GIFs
Logs
Terminal output
System specifications
System Details
python/py/python3 --version
): Python 3.11.2pip list
):LaTeX details
FFMPEG
Output of
ffmpeg -version
:Additional comments
The text was updated successfully, but these errors were encountered: