Can't use TextMobject in CONFIG in latest version
QYQSDTC opened this issue · 1 comments
QYQSDTC commented
Can't use TextMobject in CONFIG
gives error
Traceback (most recent call last):
File "./manim.py", line 5, in <module>
manimlib.main()
File "/Users/qianyiqian/Development/manim_practice/manimlib/__init__.py", line 11, in main
config = manimlib.config.get_configuration(args)
File "/Users/qianyiqian/Development/manim_practice/manimlib/config.py", line 185, in get_configuration
module = get_module(args.file)
File "/Users/qianyiqian/Development/manim_practice/manimlib/config.py", line 180, in get_module
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "myPractice.py", line 425, in <module>
class WhatIsCONFIG(Scene):
File "myPractice.py", line 427, in WhatIsCONFIG
"object_1": TextMobject("Object 1"),
File "/Users/qianyiqian/Development/manim_practice/manimlib/mobject/svg/tex_mobject.py", line 144, in __init__
self, self.arg_separator.join(tex_strings), **kwargs
File "/Users/qianyiqian/Development/manim_practice/manimlib/mobject/svg/tex_mobject.py", line 44, in __init__
self.template_tex_file_body
File "/Users/qianyiqian/Development/manim_practice/manimlib/utils/tex_file_writing.py", line 19, in tex_to_svg_file
dvi_file = tex_to_dvi(tex_file)
File "/Users/qianyiqian/Development/manim_practice/manimlib/utils/tex_file_writing.py", line 67, in tex_to_dvi
"See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: 7ba99e26556cd349.log
When I remove the TextMobjec() in CONFIG, it can be compiled.
Elteoremadebeethoven commented
Yes, that is normal, because the latest version of Manim has a different configuration when compiling .tex files, so that this does not happen you can do something like:
CONFIG = {
"text_1": "Some text"
}
def construct(self):
text = TextMobject(self.text_1)