3b1b / manim

Animation engine for explanatory math videos
MIT License
71.28k stars 6.26k forks source link

Configuring using "manimgl --config" breaks the config file. #2221

Open CoderXL1 opened 1 month ago

CoderXL1 commented 1 month ago

Describe the error

Hi there, I ran manimgl --config to modify global config and manim seems to have corrupted my default_config.yml. The new file is missing the file_writer_config, causing video generation errors. I've attached the before and after files( I have to use .txt to meet github's restriction). default_config-after.yml.txt default_config-before.yml.txt

Code and Error

Code: manimgl --config manimgl main.py main -w --finder --prerun --show_animation_progress

Error:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/manimgl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/manimlib/__main__.py", line 21, in main
    config = manimlib.config.get_configuration(args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/manimlib/config.py", line 509, in get_configuration
    "file_writer_config": get_file_writer_config(args, custom_config),
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/manimlib/config.py", line 415, in get_file_writer_config
    **custom_config["file_writer_config"],
      ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'file_writer_config'

Environment

OS System: MacOS 13 manim version: master 1.7.0 python version: 3.12.6

Varniex commented 1 month ago

You can always copy and paste the contents of default_config.yml file from this repository.

Go to manimlib > default_config.yml, Click Raw and copy the code.