Skip to content Skip to sidebar Skip to footer

Kivy .kv File Won't Read

I have just started learning to program. I have a really basic App based on a pong game tutorial on the kivy.org website, but I must have a basic flaw that I can't see, because whe

Solution 1:

  • Check whether your MainApp(App) class name is same as your .kv file name without the 'App' (if not, make them the same). It's not case sensitive. For example: MaNagerApp(App) will load manager.kv.

OR

  • If you don't want to change name then simply add self.load_kv(your_kv_file_name), like this:

    defbuild(self):
        self.load_kv('singularity.kv')
        return Singularity()
    

Solution 2:

The name of the file "name.kv" should be in lowercase

Solution 3:

Make your .kv file name as same as main Class name ex:

classgalaxyApp(App): # thisis your main class
    pass
galaxyApp().run()

make your .kv file name same as main class name (not case sensitive). In my case my .kv file name will be "galaxy.kv"

Post a Comment for "Kivy .kv File Won't Read"