3b1b / 3b1b/manim

Trouble rendering an SVG Image correctly

Offen
#926 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
SVG
Vorherrschende Sprache
Python
Sterne
93.8k
Forks
7.7k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

So, I have my own little creature that I made (it is an SVG file) using InkScape. However, it was not rendering correctly when I ran my python code. For reference, I have attached the error message that I am receiving when I try and run my code:

Media will be written to ./media/. You can change this behavior with the --media_dir flag.
conversation.py:39: UserWarning: No PsiCreatures design with mode happy
(self.file_name_prefix, mode))

Traceback (most recent call last):
File "conversation.py", line 36, in __init__
SVGMobject.__init__(self, file_name=svg_file, **kwargs)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 46, in __init__
VMobject.__init__(self, **kwargs)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/mobject.py", line 48, in __init__
self.generate_points()
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 69, in generate_points
mobjects = self.get_mobjects_from(svg)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 87, in get_mobjects_from
for child in element.childNodes
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 87, in
for child in element.childNodes
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 87, in get_mobjects_from
for child in element.childNodes
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 87, in
for child in element.childNodes
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 91, in get_mobjects_from
element.getAttribute('d')
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 119, in path_string_to_mobject
return VMobjectFromSVGPathstring(path_string)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 322, in __init__
VMobject.__init__(self, **kwargs)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/mobject.py", line 48, in __init__
self.generate_points()
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 349, in generate_points
self.handle_command(command, coord_string)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 359, in handle_command
new_points = self.string_to_points(coord_string)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 422, in string_to_points
numbers = string_to_numbers(coord_string)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 24, in string_to_numbers
for s in re.split("[ ,]", num_string)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 25, in
if s != ""
ValueError: could not convert string to float: '6.39.22'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/luketimmerman/Animation/manim/manimlib/extract_scene.py", line 155, in main
scene = SceneClass(**scene_kwargs)
File "/Users/luketimmerman/Animation/manim/manimlib/scene/scene.py", line 53, in __init__
self.construct()
File "conversation.py", line 70, in construct
psi_creature = PsiCreature()
File "conversation.py", line 44, in __init__
SVGMobject.__init__(self, mode="happy", file_name=svg_file, **kwargs)
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 45, in __init__
self.ensure_valid_file()
File "/Users/luketimmerman/Animation/manim/manimlib/mobject/svg/svg_mobject.py", line 63, in ensure_valid_file
self.file_name)
OSError: No file matching assets/PsiCreatures_happy.svg in image directory

Thanks for any help y'all can give!

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.