jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
489 stars 49 forks source link

[BUG] Invalid value for '--folder': Directory 'slides' does not exist. #461

Closed ManimLearn closed 3 months ago

ManimLearn commented 3 months ago

Hi, I have just download manim slides and try out a simple example, but I've run into this problem. How can I fix it? Thank you. screenshot_1723002060

jeertmans commented 3 months ago

Hello! This error, while not clear, indicates that you did not render the animations first, as rendering the animations should create that missing folder. Can you confirm?

jeertmans commented 3 months ago

See #98.

ManimLearn commented 3 months ago

See #98.

Hi, I have seen the post, but I still couldn't get it to work. How do I remove those 3 lines that you mentioned in post #98? This is the output after rendering my scene. (Sorry, I'm not good with coding :( ) image

jeertmans commented 3 months ago

@ManimLearn looks like the rendering process did not end very well (despite the code=0).

Can you include the full command and terminal output here? Not just the end.

ManimLearn commented 3 months ago

@jeertmans Here is the full terminal output. To rendered the scene I use Manim Slideview so I just Ctrl + S.

Manim Extension XTerm Serves as a terminal for logging purpose.

Extension Version 0.2.13

MSV c:\Users\Admin>"manim" "c:\Users\Admin\Thuyết minh nckh.py" thuyetminhNCKH Manim Community v0.18.1

[08/07/24 16:57:25] INFO Animation 0 : Using cached cairo_renderer.py:88 data (hash :
3977891868_2543504905_2231324
57)
[08/07/24 16:57:26] INFO Animation 1 : Using cached cairo_renderer.py:88 it/s] data (hash :
2852726489_1653248266_2105569
795)
INFO Combining to Movie file. scene_file_writer.py:617 it/s] INFO scene_file_writer.py:737 File ready at
'C:\Users\Admin\media\vid
--- Logging error --- Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 170, in emit self.console.print(log_renderable) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 1673, in print with self: File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 865, in exit self._exit_buffer() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 823, in _exit_buffer self._check_buffer() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 2027, in _check_buffer legacy_windows_render(buffer, LegacyWindowsTerm(self.file)) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render term.write_styled(text, style) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_win32_console.py", line 442, in write_styled self.write_text(text) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_win32_console.py", line 403, in write_text self.write(text) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\u1ebf' in position 8: character maps to Call stack: File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\manim.exe__main.py", line 7, in sys.exit(main()) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 783, in invoke return callback(args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\cli\render\commands.py", line 120, in render scene.render() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\scene\scene.py", line 239, in render self.renderer.scene_finished(self) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\renderer\cairo_renderer.py", line 269, in scene_finished self.file_writer.finish() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\scene\scene_file_writer.py", line 457, in finish self.combine_to_movie() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\scene\scene_file_writer.py", line 667, in combine_to_movie self.print_file_ready_message(str(movie_file_path)) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\scene\scene_file_writer.py", line 737, in print_file_ready_message logger.info("\nFile ready at %(file_path)s\n", {"file_path": f"'{file_path}'"}) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging__init__.py", line 1539, in info self._log(INFO, msg, args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging__init.py", line 1684, in _log self.handle(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging__init.py", line 1700, in handle self.callHandlers(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging\init.py", line 1762, in callHandlers hdlr.handle(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging\init__.py", line 1028, in handle self.emit(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 172, in emit self.handleError(record) Message: '\nFile ready at %(file_path)s\n' Arguments: {'file_path': "'C:\Users\Admin\media\videos\Thuy\u1ebft minh nckh\1080p60\thuyetminhNCKH.mp4'"} INFO scene_file_writer.py:737 File ready at
'C:\Users\Admin\media\vid
--- Logging error --- Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 170, in emit self.console.print(log_renderable) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 1673, in print with self: File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 865, in
exit self._exit_buffer() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 823, in _exit_buffer self._check_buffer() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\console.py", line 2027, in _check_buffer legacy_windows_render(buffer, LegacyWindowsTerm(self.file)) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render term.write_styled(text, style) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_win32_console.py", line 442, in write_styled self.write_text(text) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich_win32_console.py", line 403, in write_text self.write(text) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\u1ebf' in position 8: character maps to Call stack: File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\manim.exe\main.py", line 7, in sys.exit(main()) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1157, in call__ return self.main(
args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 783, in invoke return callback(*args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\cli\render\commands.py", line 120, in render scene.render() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\manim\scene\scene.py", line 247, in render logger.info( File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging__init__.py", line 1539, in info self._log(INFO, msg, args, kwargs) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging__init__.py", line 1684, in _log self.handle(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging\init.py", line 1700, in handle self.callHandlers(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging\init.py", line 1762, in callHandlers hdlr.handle(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\logging\init__.py", line 1028, in handle self.emit(record) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 172, in emit self.handleError(record) Message: 'Rendered thuyetminhNCKH\nPlayed 2 animations' Arguments: ()

jeertmans commented 3 months ago

As you can read in the terminal output, you have an error rendering the animations, that starts at:

File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ebf' in position 8: character maps to
Call stack:

This is very likely caused by your string, as it contains non utf-8 characters. Maybe you can try to wrap your strings with "my_string".encode("utf-8")?

I will close this issue as this is more related to Manim, or even Rich (which is used to print to the console), rather than Manim Slides.