Description
Description of bug / unexpected behavior
For two SVGMobjects svg1 and svg2, self.play(Transform(svg1, svg2)) will give
TypeError: object of type 'NoneType' has no len()
Expected behavior
How to reproduce the issue
Code for reproducing the problem
svg1 = SVGMObject('test1.svg')
svg2 = SVGMObject('test2.svg')
self.play(Create(svg1), Create(svg2))
self.play(Transform(svg1, svg2))
Additional media files
Images/GIFs
Logs
Terminal output
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
transform.p │
│ y:202 in begin │
│ │
│ 199 │ │ # Note, this potentially changes the structure │
│ 200 │ │ # of both mobject and target_mobject │
│ 201 │ │ if config.renderer == RendererType.OPENGL: │
│ ❱ 202 │ │ │ self.mobject.align_data_and_family(self.target_copy) │
│ 203 │ │ else: │
│ 204 │ │ │ self.mobject.align_data(self.target_copy) │
│ 205 │ │ super().begin() │
│ │
site-packages/manim/mobject/opengl/opengl │
│ _mobject.py:2469 in align_data_and_family │
│ │
│ 2466 │ │
│ 2467 │ def align_data_and_family(self, mobject: OpenGLMobject) -> Self: │
│ 2468 │ │ self.align_family(mobject) │
│ ❱ 2469 │ │ self.align_data(mobject) │
│ 2470 │ │ return self │
│ 2471 │ │
│ 2472 │ def align_data(self, mobject: OpenGLMobject) -> Self: │
│ │
│/site-packages/manim/mobject/opengl/opengl │
│ _mobject.py:2484 in align_data │
│ │
│ 2481 │ │ │ │ │ continue │
│ 2482 │ │ │ │ arr1 = mob1.data[key] │
│ 2483 │ │ │ │ arr2 = mob2.data[key] │
│ ❱ 2484 │ │ │ │ if len(arr2) > len(arr1): │
│ 2485 │ │ │ │ │ mob1.data[key] = resize_preserving_order(arr1, len(arr2)) │
│ 2486 │ │ │ │ elif len(arr1) > len(arr2): │
│ 2487 │ │ │ │ │ mob2.data[key] = resize_preserving_order(arr2, len(arr1)) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: object of type 'NoneType' has no len()
System specifications
System Details
- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (
python/py/python3 --version
): - Installed modules (provide output from
pip list
):
PASTE HERE
LaTeX details
- LaTeX distribution (e.g. TeX Live 2020):
- Installed LaTeX packages: