Skip to content

[BUG] ValueError: [Errno 22] Invalid argument #483

Open
@JoacoAnselmo

Description

@JoacoAnselmo

Terms

Describe the issue

Hi! I installed manim slides, everything went well, but whenever I try to render my scene it gives an error message (although it does render, so manim is working).

Then, if I try to run manim-slides, it tells me the JSON doesn't exist.

I haven't found anything on the other issues about this. Any help would be appreciated!

(I inserted the corresponding code and error messages below, I'm hoping it shows up on the issue report, it is my first time submitting one).

Command

manim -pqh scene.py EjemploSlides

Issue Type

Other

Python version

Python 3.11.3

Python environment

Manim Slides version: 5.1.9
Python executable: C:\Users\Joaquín\AppData\Local\Programs\Python\Python311\python.exe
Manim bindings:
"sox" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
SoX could not be found!

    If you do not have SoX, proceed here:
     - - - http://sox.sourceforge.net/ - - -

    If you do (or think that you should) have SoX, double-check your
    path variables.

        manim (version: 0.18.1)
        manimgl not found
No Qt API found, some Manim Slides commands will not be available

What is your platform?

Windows

Other platform

No response

Manim Slides Python code

class EjemploSlides(Slide):
    def construct(self):
        punto = Dot(ORIGIN, color=BLUE)
        self.play(Create(punto))
        self.next_slide()

        self.play(punto.animate.shift(RIGHT))
        self.next_slide()

        self.play(FadeOut(punto))

Relevant log output

C:\Users\Joaquín\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim\cli\render\comm │
│ ands.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:\Users\Joaquín\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_slides\slide\ma │
│ nim.py:136 in render                                                                             │
│                                                                                                  │
│   133 │   │                                                                                      │
│   134 │   │   config["max_files_cached"] = max_files_cached                                      │
│   135 │   │                                                                                      │
│ ❱ 136 │   │   self._save_slides(                                                                 │
│   137 │   │   │   use_cache=not (config["disable_caching"] or self.disable_caching),             │
│   138 │   │   │   flush_cache=(config["flush_cache"] or self.flush_cache),                       │
│   139 │   │   │   skip_reversing=self.skip_reversing,                                            │
│                                                                                                  │
│ C:\Users\Joaquín\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_slides\slide\ba │
│ se.py:532 in _save_slides                                                                        │
│                                                                                                  │
│   529 │   │   │                                                                                  │
│   530 │   │   │   # We only concat animations if it was not present                              │
│   531 │   │   │   if not use_cache or not dst_file.exists():                                     │
│ ❱ 532 │   │   │   │   concatenate_video_files(slide_files, dst_file)                             │
│   533 │   │   │                                                                                  │
│   534 │   │   │   # We only reverse video if it was not present                                  │
│   535 │   │   │   if not use_cache or not rev_file.exists():                                     │
│                                                                                                  │
│ C:\Users\Joaquín\AppData\Local\Programs\Python\Python311\Lib\site-packages\manim_slides\utils.py │
│ :34 in concatenate_video_files                                                                   │
│                                                                                                  │
│    31 │   │   tmp_file = f.name                                                                  │
│    32 │                                                                                          │
│    33 │   with (                                                                                 │
│ ❱  34 │   │   av.open(tmp_file, format="concat", options={"safe": "0"}) as input_container,      │
│    35 │   │   av.open(str(dest), mode="w") as output_container,                                  │
│    36 │   ):                                                                                     │
│    37 │   │   input_video_stream = input_container.streams.video[0]                              │
│                                                                                                  │
│ in av.container.core.open:420                                                                    │
│                                                                                                  │
│ in av.container.core.Container.__cinit__:266                                                     │
│                                                                                                  │
│ in av.container.core.Container.err_check:286                                                     │
│                                                                                                  │
│ in av.error.err_check:326                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: [Errno 22] Invalid argument: 'C:\\Users\\JOAQUN~1\\AppData\\Local\\Temp\\tmp519hqu_y.txt'

# And then I get
Usage: manim-slides present [OPTIONS] [SCENES]...

Error: File slides\EjemploSlides.json does not exist, check the scene name and make sure to use Slide as your scene base class

Screenshots

No response

Additional information

This is the first time I'm using it, so there may be an installation bug or something like that

Recommended fix or suggestions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliRelated to the command line interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions