galatolofederico / manim-presentation

Tool for live presentations using manim
GNU General Public License v3.0
162 stars 18 forks source link

I cant create my first presentation even though I followed the instructions provided. #3

Closed Ammar34 closed 3 years ago

Ammar34 commented 3 years ago

I am trying to render my first presentation but I am getting an error that says no config file found. it asks me to use Slide as base class for scene which i am doing as is evident in the following code: P.S i am using manimCE v0.6.0

from manim import *
from mytextemplate import *
from manim_presentation import Slide

class Testing(Slide):
    def construct(self):
        introduction = MyTexTemplate("Introduction",tex_type = "tex",font = "Alegreya-Regular")
        self.add(introduction)
        self.wait(1)
        self.pause()

The introduction variable is created and uses a custom module that I modified to suit my needs. Following is the error code after the using manim_presentation Testing File "C:\Users\khans\AppData\Local\Programs\Python\Python39\Scripts\manim_presentation-script.py", line 33, in sys.exit(load_entry_point('manim-presentation==0.1.3', 'console_scripts', 'manim_presentation')()) File "c:\users\khans\appdata\local\programs\python\python39\lib\site-packages\manim_presentation\present.py", line 238, in main raise Exception(f"File {config_file} does not exist, check the scene name and make sure to use Slide as your scene base class") Exception: File ./presentation\Testing.json does not exist, check the scene name and make sure to use Slide as your scene base class

Ammar34 commented 3 years ago

i even tried the example.py but got the same error.

galatolofederico commented 3 years ago

Hi, this is very likely due to the fact that i wrote and tested manim-presentation on Linux. Can you try running it inside WSL?

Ammar34 commented 3 years ago

Sure, i will give it a try and see if it works.

Ammar34 commented 3 years ago

However, can you pls do some testing and make it work on windows?

mxsdev commented 3 years ago

Works for me on Windows 10 Pro x64 10.0.19042 Build 19042. Are you cd'ed into the local directory?

If not then the issue may be this line in present.py:

parser.add_argument("--folder", type=str, default="./presentation", help="Presentation files folder")

Perhaps changing "./presentation" to os.path.normcase("./presentation") is necessary.

Ammar34 commented 3 years ago

Works for me on Windows 10 Pro x64 10.0.19042 Build 19042. Are you cd'ed into the local directory?

If not then the issue may be this line in present.py:

parser.add_argument("--folder", type=str, default="./presentation", help="Presentation files folder")

Perhaps changing "./presentation" to os.path.normcase("./presentation") is necessary.

I will try that today, I installed the manim-presentation in python site-packages and that is already added to the path. i dont know what you mean by cd'ing into the local directory. I tried looking for presentation folder in directory where my test file resides but its not there. Pls do elaborate.

Ammar34 commented 3 years ago

I found the presentation folder and json file in the local directory. I just have to rerun the program and make the change suggested by @charburgx. hope it works

galatolofederico commented 3 years ago

Hi @charburgx thanks for the insight! I added os.path.normcase in 4216299.