ManimML
ManimML copied to clipboard
'size' has incorrect type (expected int, got float)
I am just trying to run the first example in the Readme.md. I am running on an M1 Pro Mac. I did a conda install of Manim Community v0.17.3 and pip install of the python library (manim 0.17.3, manim-ml 0.0.24). I am getting the following TypeError:
manim -pql manim_test.py
Manim Community v0.17.3
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Blah/lib/python3.10/site-packages/manim/cli/render/command │ │ s.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) │ │ │ │ /Blah/lib/python3.10/site-packages/manim/scene/scene.py:223 │ │ in render │ │ │ │ 220 │ │ """ │ │ 221 │ │ self.setup() │ │ 222 │ │ try: │ │ ❱ 223 │ │ │ self.construct() │ │ 224 │ │ except EndSceneEarlyException: │ │ 225 │ │ │ pass │ │ 226 │ │ except RerunSceneException as e: │ │ │ │ /Blah/manim_test.py:18 in │ │ construct │ │ │ │ 15 │ def construct(self): │ │ 16 │ │ # Make the neural network │ │ 17 │ │ nn = NeuralNetwork([ │ │ ❱ 18 │ │ │ │ Convolutional2DLayer(int(1), int(7), int(3), filter_spacing=0.32), │ │ 19 │ │ │ │ Convolutional2DLayer(int(3), int(5), int(3), filter_spacing=0.32), │ │ 20 │ │ │ │ Convolutional2DLayer(int(5), int(3), int(3), filter_spacing=0.18), │ │ 21 │ │ │ │ FeedForwardLayer(3), │ │ │ │ /Blah/lib/python3.10/site-packages/manim_ml/neural_network/ │ │ layers/convolutional_2d.py:128 in init │ │ │ │ 125 │ │ padding_dashed=True, │ │ 126 │ │ **kwargs, │ │ 127 │ ): │ │ ❱ 128 │ │ super().init(**kwargs) │ │ 129 │ │ self.num_feature_maps = num_feature_maps │ │ 130 │ │ self.filter_color = filter_color │ │ 131 │ │ if isinstance(padding, tuple): │ │ │ │ /Blah/lib/python3.10/site-packages/manim_ml/neural_network/ │ │ layers/parent_layers.py:46 in init │ │ │ │ 43 │ │ 44 class VGroupNeuralNetworkLayer(NeuralNetworkLayer): │ │ 45 │ def init(self, *args, **kwargs): │ │ ❱ 46 │ │ super().init(*args, **kwargs) │ │ 47 │ │ # self.camera = camera │ │ 48 │ │ │ 49 │ @abstractmethod │ │ │ │ /Blah/lib/python3.10/site-packages/manim_ml/neural_network/ │ │ layers/parent_layers.py:10 in init │ │ │ │ 7 │ def init(self, text=None, *args, **kwargs): │ │ 8 │ │ super(Group, self).init() │ │ 9 │ │ self.title_text = kwargs["title"] if "title" in kwargs else " " │ │ ❱ 10 │ │ self.title = Text(self.title_text, font_size=DEFAULT_FONT_SIZE / 3).scale(0.6) │ │ 11 │ │ self.title.next_to(self, UP, 1.2) │ │ 12 │ │ # self.add(self.title) │ │ 13 │ │ │ │ /Blah/lib/python3.10/site-packages/manim/mobject/text/text_ │ │ mobject.py:486 in init │ │ │ │ 483 │ │ │ self.line_spacing = self._font_size + self._font_size * self.line_spacing │ │ 484 │ │ │ │ 485 │ │ color = Color(color) if color else VMobject().color │ │ ❱ 486 │ │ file_name = self.text2svg(color) │ │ 487 │ │ PangoUtils.remove_last_M(file_name) │ │ 488 │ │ super().init( │ │ 489 │ │ │ file_name, │ │ │ │ /Blah/lib/python3.10/site-packages/manim/mobject/text/text │ │ mobject.py:814 in _text2svg │ │ │ │ 811 │ │ │ width = config["pixel_width"] │ │ 812 │ │ │ height = config["pixel_height"] │ │ 813 │ │ │ │ │ ❱ 814 │ │ │ svg_file = manimpango.text2svg( │ │ 815 │ │ │ │ settings, │ │ 816 │ │ │ │ size, │ │ 817 │ │ │ │ line_spacing, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ TypeError: Argument 'size' has incorrect type (expected int, got float)