• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Why is my manim scene being converted into a png instead of an mp4

Resolved: Why is my manim scene being converted into a png instead of an mp4

0
By Isaac Tonny on 04/04/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Why is my manim scene being converted into a png instead of an mp4

Question:

I have a python file that I am using to program a few scenes in manim. I looked over the Quick Start documentation, and everything works fine. But when I made another scene, called ThreeSquares, it converts the file into a black png. I have no idea what’s going wrong, what should I do?
Code for the function:
I’ve tried running the command manim -pql scene.py ThreeSquares (scene.py is the file name), and that produced a black png.
I’ve also tried python -m manim scene.py ThreeSquares -p -ql, and that yielded the same result.
I’ve also tried to look in the documentation for any reason as to why this is happening, and I came up with nothing. I’ve also looked around on StackOverflow for this and there doesn’t seem to be problems pertaining to this specific result.

Best Answer:

the solution is very simple, you have written you logic in a function named constructor instead of construct in the 4rd line which is what manim looks for to render the video. Please correct the function name and it should work.
Also add parentheses to like so self.wait() in the last line (this does not cause an error though). Hope this helps thankyou!

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

manim python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to stop a thread that has a blocking function from easygui in python

05/04/2023

Resolved: Removing null keys from a json array of objects

05/04/2023

Resolved: How can I generate at compile-time a separate OpenAPI Swagger.json file for each Controller in my ASP.NET project?

05/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.