You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My manim voice over started to throw this error all of a sudden:
JSONDecodeError: Invalid control character at line 4906 column 19 (char 147456)
Initially, it was working fine, but at some point, it started to raise that error. I have reinstalled the package and tried to run the examples on the repo but without success.
[02/11/23 10:20:15] ERROR module_ops.py:90
whatIsAVector is not in the script
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/cli/render/comma │
│ nds.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/scene/scene.py:2 │
│ 23 in render │
│ │
│ 220 │ │ """ │
│ 221 │ │ self.setup() │
│ 222 │ │ try: │
│ ❱ 223 │ │ │ self.construct() │
│ 224 │ │ except EndSceneEarlyException: │
│ 225 │ │ │ pass │
│ 226 │ │ except RerunSceneException as e: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/main.py:21 in construct │
│ │
│ 18 │ │ │
│ 19 │ │ question = Text("What is a vector ?", weight=BOLD, color='ORANGE') │
│ 20 │ │ │
│ ❱ 21 │ │ with self.voiceover(text="""You can think of a vector in simple terms as a list │
│ 22 │ │ │ │ │ │ each item in this structure matters. │
│ 23 │ │ │ │ │ │ In machine learning, this will often be the case.""") as trac │
│ 24 │ │ │ self.play(Write(question)) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/contextlib.py:119 in enter │
│ │
│ 116 │ │ # they are only needed for recreation, which is not possible anymore │
│ 117 │ │ del self.args, self.kwds, self.func │
│ 118 │ │ try: │
│ ❱ 119 │ │ │ return next(self.gen) │
│ 120 │ │ except StopIteration: │
│ 121 │ │ │ raise RuntimeError("generator didn't yield") from None │
│ 122 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:180 in voiceover │
│ │
│ 177 │ │ │
│ 178 │ │ try: │
│ 179 │ │ │ if text is not None: │
│ ❱ 180 │ │ │ │ yield self.add_voiceover_text(text, **kwargs) │
│ 181 │ │ │ elif ssml is not None: │
│ 182 │ │ │ │ yield self.add_voiceover_ssml(ssml, **kwargs) │
│ 183 │ │ finally: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:63 in add_voiceover_text │
│ │
│ 60 │ │ │ │ "You need to call init_voiceover() before adding a voiceover." │
│ 61 │ │ │ ) │
│ 62 │ │ │
│ ❱ 63 │ │ dict_ = self.speech_service.wrap_generate_from_text(text, **kwargs) │
│ 64 │ │ tracker = VoiceoverTracker(self, dict, self.speech_service.cache_dir) │
│ 65 │ │ self.add_sound(str(Path(self.speech_service.cache_dir) / dict_["final_audio"])) │
│ 66 │ │ self.current_tracker = tracker │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:85 in wrap_generate_from_text │
│ │
│ 82 │ │ # Replace newlines with lines, reduce multiple consecutive spaces to single │
│ 83 │ │ text = " ".join(text.split()) │
│ 84 │ │ │
│ ❱ 85 │ │ dict = self.generate_from_text(text, cache_dir=None, path=path, **kwargs) │
│ 86 │ │ original_audio = dict_["original_audio"] │
│ 87 │ │ │
│ 88 │ │ # Check whether word boundaries exist and if not run stt │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/azure.py:135 in generate_from_text │
│ │
│ 132 │ │ │ }, │
│ 133 │ │ } │
│ 134 │ │ │
│ ❱ 135 │ │ cached_result = self.get_cached_result(input_data, cache_dir) │
│ 136 │ │ if cached_result is not None: │
│ 137 │ │ │ return cached_result │
│ 138 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:166 in get_cached_result │
│ │
│ 163 │ def get_cached_result(self, input_data, cache_dir): │
│ 164 │ │ json_path = os.path.join(cache_dir / DEFAULT_VOICEOVER_CACHE_JSON_FILENAME) │
│ 165 │ │ if os.path.exists(json_path): │
│ ❱ 166 │ │ │ json_data = json.load(open(json_path, "r")) │
│ 167 │ │ │ for entry in json_data: │
│ 168 │ │ │ │ if entry["input_data"] == input_data: │
│ 169 │ │ │ │ │ return entry │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:293 in load │
│ │
│ 290 │ To use a custom JSONDecoder subclass, specify it with the cls │
│ 291 │ kwarg; otherwise JSONDecoder is used. │
│ 292 │ """ │
│ ❱ 293 │ return loads(fp.read(), │
│ 294 │ │ cls=cls, object_hook=object_hook, │
│ 295 │ │ parse_float=parse_float, parse_int=parse_int, │
│ 296 │ │ parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:346 in loads │
│ │
│ 343 │ if (cls is None and object_hook is None and │
│ 344 │ │ │ parse_int is None and parse_float is None and │
│ 345 │ │ │ parse_constant is None and object_pairs_hook is None and not kw): │
│ ❱ 346 │ │ return _default_decoder.decode(s) │
│ 347 │ if cls is None: │
│ 348 │ │ cls = JSONDecoder │
│ 349 │ if object_hook is not None: │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:337 in decode │
│ │
│ 334 │ │ containing a JSON document). │
│ 335 │ │ │
│ 336 │ │ """ │
│ ❱ 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
│ 338 │ │ end = _w(s, end).end() │
│ 339 │ │ if end != len(s): │
│ 340 │ │ │ raise JSONDecodeError("Extra data", s, end) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:353 in raw_decode │
│ │
│ 350 │ │ │
│ 351 │ │ """ │
│ 352 │ │ try: │
│ ❱ 353 │ │ │ obj, end = self.scan_once(s, idx) │
│ 354 │ │ except StopIteration as err: │
│ 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) from None │
│ 356 │ │ return obj, end │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Invalid control character at: line 4906 column 19 (char 147456)
(venv) (base) jorgebrasil@jorges-air manim % manim -pql --disable_caching main.py GTTSExample
Manim Community v0.17.2
[02/11/23 10:22:00] ERROR module_ops.py:90
GTTSExample is not in the script
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/cli/render/comma │
│ nds.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/scene/scene.py:2 │
│ 23 in render │
│ │
│ 220 │ │ """ │
│ 221 │ │ self.setup() │
│ 222 │ │ try: │
│ ❱ 223 │ │ │ self.construct() │
│ 224 │ │ except EndSceneEarlyException: │
│ 225 │ │ │ pass │
│ 226 │ │ except RerunSceneException as e: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/main.py:21 in construct │
│ │
│ 18 │ │ │
│ 19 │ │ question = Text("What is a vector ?", weight=BOLD, color='ORANGE') │
│ 20 │ │ │
│ ❱ 21 │ │ with self.voiceover(text="""You can think of a vector in simple terms as a list │
│ 22 │ │ │ │ │ │ each item in this structure matters. │
│ 23 │ │ │ │ │ │ In machine learning, this will often be the case.""") as trac │
│ 24 │ │ │ self.play(Write(question)) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/contextlib.py:119 in enter │
│ │
│ 116 │ │ # they are only needed for recreation, which is not possible anymore │
│ 117 │ │ del self.args, self.kwds, self.func │
│ 118 │ │ try: │
│ ❱ 119 │ │ │ return next(self.gen) │
│ 120 │ │ except StopIteration: │
│ 121 │ │ │ raise RuntimeError("generator didn't yield") from None │
│ 122 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:180 in voiceover │
│ │
│ 177 │ │ │
│ 178 │ │ try: │
│ 179 │ │ │ if text is not None: │
│ ❱ 180 │ │ │ │ yield self.add_voiceover_text(text, **kwargs) │
│ 181 │ │ │ elif ssml is not None: │
│ 182 │ │ │ │ yield self.add_voiceover_ssml(ssml, **kwargs) │
│ 183 │ │ finally: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:63 in add_voiceover_text │
│ │
│ 60 │ │ │ │ "You need to call init_voiceover() before adding a voiceover." │
│ 61 │ │ │ ) │
│ 62 │ │ │
│ ❱ 63 │ │ dict_ = self.speech_service.wrap_generate_from_text(text, **kwargs) │
│ 64 │ │ tracker = VoiceoverTracker(self, dict, self.speech_service.cache_dir) │
│ 65 │ │ self.add_sound(str(Path(self.speech_service.cache_dir) / dict_["final_audio"])) │
│ 66 │ │ self.current_tracker = tracker │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:85 in wrap_generate_from_text │
│ │
│ 82 │ │ # Replace newlines with lines, reduce multiple consecutive spaces to single │
│ 83 │ │ text = " ".join(text.split()) │
│ 84 │ │ │
│ ❱ 85 │ │ dict = self.generate_from_text(text, cache_dir=None, path=path, **kwargs) │
│ 86 │ │ original_audio = dict_["original_audio"] │
│ 87 │ │ │
│ 88 │ │ # Check whether word boundaries exist and if not run stt │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/azure.py:135 in generate_from_text │
│ │
│ 132 │ │ │ }, │
│ 133 │ │ } │
│ 134 │ │ │
│ ❱ 135 │ │ cached_result = self.get_cached_result(input_data, cache_dir) │
│ 136 │ │ if cached_result is not None: │
│ 137 │ │ │ return cached_result │
│ 138 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:166 in get_cached_result │
│ │
│ 163 │ def get_cached_result(self, input_data, cache_dir): │
│ 164 │ │ json_path = os.path.join(cache_dir / DEFAULT_VOICEOVER_CACHE_JSON_FILENAME) │
│ 165 │ │ if os.path.exists(json_path): │
│ ❱ 166 │ │ │ json_data = json.load(open(json_path, "r")) │
│ 167 │ │ │ for entry in json_data: │
│ 168 │ │ │ │ if entry["input_data"] == input_data: │
│ 169 │ │ │ │ │ return entry │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:293 in load │
│ │
│ 290 │ To use a custom JSONDecoder subclass, specify it with the cls │
│ 291 │ kwarg; otherwise JSONDecoder is used. │
│ 292 │ """ │
│ ❱ 293 │ return loads(fp.read(), │
│ 294 │ │ cls=cls, object_hook=object_hook, │
│ 295 │ │ parse_float=parse_float, parse_int=parse_int, │
│ 296 │ │ parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:346 in loads │
│ │
│ 343 │ if (cls is None and object_hook is None and │
│ 344 │ │ │ parse_int is None and parse_float is None and │
│ 345 │ │ │ parse_constant is None and object_pairs_hook is None and not kw): │
│ ❱ 346 │ │ return _default_decoder.decode(s) │
│ 347 │ if cls is None: │
│ 348 │ │ cls = JSONDecoder │
│ 349 │ if object_hook is not None: │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:337 in decode │
│ │
│ 334 │ │ containing a JSON document). │
│ 335 │ │ │
│ 336 │ │ """ │
│ ❱ 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
│ 338 │ │ end = _w(s, end).end() │
│ 339 │ │ if end != len(s): │
│ 340 │ │ │ raise JSONDecodeError("Extra data", s, end) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:353 in raw_decode │
│ │
│ 350 │ │ │
│ 351 │ │ """ │
│ 352 │ │ try: │
│ ❱ 353 │ │ │ obj, end = self.scan_once(s, idx) │
│ 354 │ │ except StopIteration as err: │
│ 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) from None │
│ 356 │ │ return obj, end │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Invalid control character at: line 4906 column 19 (char 147456)
System specifications
System Details
MackBook Air M1 2020 BigSur
RAM: 16
Python version 3.9:
Installed modules (provide output from pip list):
Additional comments
The text was updated successfully, but these errors were encountered:
Preliminaries
installation instructions.
Description of error
My manim voice over started to throw this error all of a sudden:
JSONDecodeError: Invalid control character at line 4906 column 19 (char 147456)
Initially, it was working fine, but at some point, it started to raise that error. I have reinstalled the package and tried to run the examples on the repo but without success.
[02/11/23 10:20:15] ERROR module_ops.py:90
whatIsAVector is not in the script
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/cli/render/comma │
│ nds.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/scene/scene.py:2 │
│ 23 in render │
│ │
│ 220 │ │ """ │
│ 221 │ │ self.setup() │
│ 222 │ │ try: │
│ ❱ 223 │ │ │ self.construct() │
│ 224 │ │ except EndSceneEarlyException: │
│ 225 │ │ │ pass │
│ 226 │ │ except RerunSceneException as e: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/main.py:21 in construct │
│ │
│ 18 │ │ │
│ 19 │ │ question = Text("What is a vector ?", weight=BOLD, color='ORANGE') │
│ 20 │ │ │
│ ❱ 21 │ │ with self.voiceover(text="""You can think of a vector in simple terms as a list │
│ 22 │ │ │ │ │ │ each item in this structure matters. │
│ 23 │ │ │ │ │ │ In machine learning, this will often be the case.""") as trac │
│ 24 │ │ │ self.play(Write(question)) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/contextlib.py:119 in enter │
│ │
│ 116 │ │ # they are only needed for recreation, which is not possible anymore │
│ 117 │ │ del self.args, self.kwds, self.func │
│ 118 │ │ try: │
│ ❱ 119 │ │ │ return next(self.gen) │
│ 120 │ │ except StopIteration: │
│ 121 │ │ │ raise RuntimeError("generator didn't yield") from None │
│ 122 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:180 in voiceover │
│ │
│ 177 │ │ │
│ 178 │ │ try: │
│ 179 │ │ │ if text is not None: │
│ ❱ 180 │ │ │ │ yield self.add_voiceover_text(text, **kwargs) │
│ 181 │ │ │ elif ssml is not None: │
│ 182 │ │ │ │ yield self.add_voiceover_ssml(ssml, **kwargs) │
│ 183 │ │ finally: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:63 in add_voiceover_text │
│ │
│ 60 │ │ │ │ "You need to call init_voiceover() before adding a voiceover." │
│ 61 │ │ │ ) │
│ 62 │ │ │
│ ❱ 63 │ │ dict_ = self.speech_service.wrap_generate_from_text(text, **kwargs) │
│ 64 │ │ tracker = VoiceoverTracker(self, dict, self.speech_service.cache_dir) │
│ 65 │ │ self.add_sound(str(Path(self.speech_service.cache_dir) / dict_["final_audio"])) │
│ 66 │ │ self.current_tracker = tracker │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:85 in wrap_generate_from_text │
│ │
│ 82 │ │ # Replace newlines with lines, reduce multiple consecutive spaces to single │
│ 83 │ │ text = " ".join(text.split()) │
│ 84 │ │ │
│ ❱ 85 │ │ dict = self.generate_from_text(text, cache_dir=None, path=path, **kwargs) │
│ 86 │ │ original_audio = dict_["original_audio"] │
│ 87 │ │ │
│ 88 │ │ # Check whether word boundaries exist and if not run stt │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/azure.py:135 in generate_from_text │
│ │
│ 132 │ │ │ }, │
│ 133 │ │ } │
│ 134 │ │ │
│ ❱ 135 │ │ cached_result = self.get_cached_result(input_data, cache_dir) │
│ 136 │ │ if cached_result is not None: │
│ 137 │ │ │ return cached_result │
│ 138 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:166 in get_cached_result │
│ │
│ 163 │ def get_cached_result(self, input_data, cache_dir): │
│ 164 │ │ json_path = os.path.join(cache_dir / DEFAULT_VOICEOVER_CACHE_JSON_FILENAME) │
│ 165 │ │ if os.path.exists(json_path): │
│ ❱ 166 │ │ │ json_data = json.load(open(json_path, "r")) │
│ 167 │ │ │ for entry in json_data: │
│ 168 │ │ │ │ if entry["input_data"] == input_data: │
│ 169 │ │ │ │ │ return entry │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:293 in load │
│ │
│ 290 │ To use a custom
JSONDecoder
subclass, specify it with thecls
││ 291 │ kwarg; otherwise
JSONDecoder
is used. ││ 292 │ """ │
│ ❱ 293 │ return loads(fp.read(), │
│ 294 │ │ cls=cls, object_hook=object_hook, │
│ 295 │ │ parse_float=parse_float, parse_int=parse_int, │
│ 296 │ │ parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:346 in loads │
│ │
│ 343 │ if (cls is None and object_hook is None and │
│ 344 │ │ │ parse_int is None and parse_float is None and │
│ 345 │ │ │ parse_constant is None and object_pairs_hook is None and not kw): │
│ ❱ 346 │ │ return _default_decoder.decode(s) │
│ 347 │ if cls is None: │
│ 348 │ │ cls = JSONDecoder │
│ 349 │ if object_hook is not None: │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:337 in decode │
│ │
│ 334 │ │ containing a JSON document). │
│ 335 │ │ │
│ 336 │ │ """ │
│ ❱ 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
│ 338 │ │ end = _w(s, end).end() │
│ 339 │ │ if end != len(s): │
│ 340 │ │ │ raise JSONDecodeError("Extra data", s, end) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:353 in raw_decode │
│ │
│ 350 │ │ │
│ 351 │ │ """ │
│ 352 │ │ try: │
│ ❱ 353 │ │ │ obj, end = self.scan_once(s, idx) │
│ 354 │ │ except StopIteration as err: │
│ 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) from None │
│ 356 │ │ return obj, end │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Invalid control character at: line 4906 column 19 (char 147456)
(venv) (base) jorgebrasil@jorges-air manim % manim -pql --disable_caching main.py GTTSExample
Manim Community v0.17.2
[02/11/23 10:22:00] ERROR module_ops.py:90
GTTSExample is not in the script
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/cli/render/comma │
│ nds.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim/scene/scene.py:2 │
│ 23 in render │
│ │
│ 220 │ │ """ │
│ 221 │ │ self.setup() │
│ 222 │ │ try: │
│ ❱ 223 │ │ │ self.construct() │
│ 224 │ │ except EndSceneEarlyException: │
│ 225 │ │ │ pass │
│ 226 │ │ except RerunSceneException as e: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/main.py:21 in construct │
│ │
│ 18 │ │ │
│ 19 │ │ question = Text("What is a vector ?", weight=BOLD, color='ORANGE') │
│ 20 │ │ │
│ ❱ 21 │ │ with self.voiceover(text="""You can think of a vector in simple terms as a list │
│ 22 │ │ │ │ │ │ each item in this structure matters. │
│ 23 │ │ │ │ │ │ In machine learning, this will often be the case.""") as trac │
│ 24 │ │ │ self.play(Write(question)) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/contextlib.py:119 in enter │
│ │
│ 116 │ │ # they are only needed for recreation, which is not possible anymore │
│ 117 │ │ del self.args, self.kwds, self.func │
│ 118 │ │ try: │
│ ❱ 119 │ │ │ return next(self.gen) │
│ 120 │ │ except StopIteration: │
│ 121 │ │ │ raise RuntimeError("generator didn't yield") from None │
│ 122 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:180 in voiceover │
│ │
│ 177 │ │ │
│ 178 │ │ try: │
│ 179 │ │ │ if text is not None: │
│ ❱ 180 │ │ │ │ yield self.add_voiceover_text(text, **kwargs) │
│ 181 │ │ │ elif ssml is not None: │
│ 182 │ │ │ │ yield self.add_voiceover_ssml(ssml, **kwargs) │
│ 183 │ │ finally: │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/voiceo │
│ ver_scene.py:63 in add_voiceover_text │
│ │
│ 60 │ │ │ │ "You need to call init_voiceover() before adding a voiceover." │
│ 61 │ │ │ ) │
│ 62 │ │ │
│ ❱ 63 │ │ dict_ = self.speech_service.wrap_generate_from_text(text, **kwargs) │
│ 64 │ │ tracker = VoiceoverTracker(self, dict, self.speech_service.cache_dir) │
│ 65 │ │ self.add_sound(str(Path(self.speech_service.cache_dir) / dict_["final_audio"])) │
│ 66 │ │ self.current_tracker = tracker │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:85 in wrap_generate_from_text │
│ │
│ 82 │ │ # Replace newlines with lines, reduce multiple consecutive spaces to single │
│ 83 │ │ text = " ".join(text.split()) │
│ 84 │ │ │
│ ❱ 85 │ │ dict = self.generate_from_text(text, cache_dir=None, path=path, **kwargs) │
│ 86 │ │ original_audio = dict_["original_audio"] │
│ 87 │ │ │
│ 88 │ │ # Check whether word boundaries exist and if not run stt │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/azure.py:135 in generate_from_text │
│ │
│ 132 │ │ │ }, │
│ 133 │ │ } │
│ 134 │ │ │
│ ❱ 135 │ │ cached_result = self.get_cached_result(input_data, cache_dir) │
│ 136 │ │ if cached_result is not None: │
│ 137 │ │ │ return cached_result │
│ 138 │
│ │
│ /Users/jorgebrasil/PycharmProjects/manim/venv/lib/python3.9/site-packages/manim_voiceover/servic │
│ es/base.py:166 in get_cached_result │
│ │
│ 163 │ def get_cached_result(self, input_data, cache_dir): │
│ 164 │ │ json_path = os.path.join(cache_dir / DEFAULT_VOICEOVER_CACHE_JSON_FILENAME) │
│ 165 │ │ if os.path.exists(json_path): │
│ ❱ 166 │ │ │ json_data = json.load(open(json_path, "r")) │
│ 167 │ │ │ for entry in json_data: │
│ 168 │ │ │ │ if entry["input_data"] == input_data: │
│ 169 │ │ │ │ │ return entry │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:293 in load │
│ │
│ 290 │ To use a custom
JSONDecoder
subclass, specify it with thecls
││ 291 │ kwarg; otherwise
JSONDecoder
is used. ││ 292 │ """ │
│ ❱ 293 │ return loads(fp.read(), │
│ 294 │ │ cls=cls, object_hook=object_hook, │
│ 295 │ │ parse_float=parse_float, parse_int=parse_int, │
│ 296 │ │ parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/init.py:346 in loads │
│ │
│ 343 │ if (cls is None and object_hook is None and │
│ 344 │ │ │ parse_int is None and parse_float is None and │
│ 345 │ │ │ parse_constant is None and object_pairs_hook is None and not kw): │
│ ❱ 346 │ │ return _default_decoder.decode(s) │
│ 347 │ if cls is None: │
│ 348 │ │ cls = JSONDecoder │
│ 349 │ if object_hook is not None: │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:337 in decode │
│ │
│ 334 │ │ containing a JSON document). │
│ 335 │ │ │
│ 336 │ │ """ │
│ ❱ 337 │ │ obj, end = self.raw_decode(s, idx=_w(s, 0).end()) │
│ 338 │ │ end = _w(s, end).end() │
│ 339 │ │ if end != len(s): │
│ 340 │ │ │ raise JSONDecodeError("Extra data", s, end) │
│ │
│ /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/json/decoder.py:353 in raw_decode │
│ │
│ 350 │ │ │
│ 351 │ │ """ │
│ 352 │ │ try: │
│ ❱ 353 │ │ │ obj, end = self.scan_once(s, idx) │
│ 354 │ │ except StopIteration as err: │
│ 355 │ │ │ raise JSONDecodeError("Expecting value", s, err.value) from None │
│ 356 │ │ return obj, end │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Invalid control character at: line 4906 column 19 (char 147456)
System specifications
System Details
pip list
):Additional comments
The text was updated successfully, but these errors were encountered: