OSError: [WinError -2146959355] Server execution failed
Closed this issue · 1 comments
yasenstar commented
Describe the error
When I run code with "manim -pql filename.py classname", after the processing is done, the error popup and cannot display the animation.
While, the mp4 file (both complete and partial ones) are generated, and can be played manually.
Code and Error
Code: the one in Overview of Deep Dive in Thematic Guides
from manim import *
class ToyExample(Scene):
def construct(self):
organge_square = Square(color=ORANGE, fill_opacity=0.5)
blue_circle = Circle(color=BLUE, fill_opacity = 0.5)
self.add(organge_square)
self.play(ReplacementTransform(organge_square, blue_circle, run_time=3))
small_dot = Dot()
small_dot.add_updater(lambda mob: mob.next_to(blue_circle, DOWN))
self.play(Create(small_dot))
self.play(blue_circle.animate.shift(UP))
self.wait()
self.play(FadeOut(blue_circle, run_time=4))
Error:
╭─────────────────────── Traceback (most recent call last) ────────────────────────╮
│ C:\tools\Manim\Lib\site-packages\manim\cli\render\commands.py:120 in render │
│ │
│ 117 │ │ │ try: │
│ 118 │ │ │ │ with tempconfig({}): │
│ 119 │ │ │ │ │ scene = SceneClass() │
│ ❱ 120 │ │ │ │ │ scene.render() │
│ 121 │ │ │ except Exception: │
│ 122 │ │ │ │ error_console.print_exception() │
│ 123 │ │ │ │ sys.exit(1) │
│ │
│ C:\tools\Manim\Lib\site-packages\manim\scene\scene.py:256 in render │
│ │
│ 253 │ │ │ config["preview"] = True │
│ 254 │ │ │
│ 255 │ │ if config["preview"] or config["show_in_file_browser"]: │
│ ❱ 256 │ │ │ open_media_file(self.renderer.file_writer) │
│ 257 │ │
│ 258 │ def setup(self): │
│ 259 │ │ """ │
│ │
│ C:\tools\Manim\Lib\site-packages\manim\utils\file_ops.py:229 in open_media_file │
│ │
│ 226 │ │ if config["show_in_file_browser"]: │
│ 227 │ │ │ open_file(file_path, True) │
│ 228 │ │ if config["preview"]: │
│ ❱ 229 │ │ │ open_file(file_path, False) │
│ 230 │ │ │ │
│ 231 │ │ │ logger.info(f"Previewed File at: '{file_path}'") │
│ 232 │
│ │
│ C:\tools\Manim\Lib\site-packages\manim\utils\file_ops.py:192 in open_file │
│ │
│ 189 def open_file(file_path, in_browser=False): │
│ 190 │ current_os = platform.system() │
│ 191 │ if current_os == "Windows": │
│ ❱ 192 │ │ os.startfile(file_path if not in_browser else file_path.parent) │
│ 193 │ else: │
│ 194 │ │ if current_os == "Linux": │
│ 195 │ │ │ commands = ["xdg-open"] │
╰──────────────────────────────────────────────────────────────────────────────────╯
OSError: [WinError -2146959355] Server execution failed:
'C:\\GitHub\\python\\Manim\\2_Thematic\\2.2_Deep-Dive\\2.2-1\\media\\videos\\ToyExam
ple\\480p15\\ToyExample.mp4'
Environment
OS System: Microsoft Windows 11
manim version: master v0.18.1
python version: 3.12.6
Thanks,
Xiaoqi
yasenstar commented
Hello all,
I found the issue may due to my default video player app has issue in Windows 11, after I manually point mp4's default app to Media Player, now the error is gone.
I'll close this issue since it's not the bug from Manim, however, that is one dependencies when using Manim in Windows.
Thanks,
Xiaoqi