Search code examples
pythonkivy

I cannot create kivy file that is working


I am the beginner and I just want to create a .kv file. However, when I create a kv file, the terminal show me the error as follow. I actually did install kivy using pip install kivy but I face this problem.

This image is the kv file I created, I don't know the problem mean and I cant find solution, please help.

kv file

kv file

main.py

This is the main.py


Solution

  • The documentation says:

    The content of the file should always start with the Kivy header, where version must be replaced with the Kivy language version you’re using. For now, use 1.0:

    #:kivy 1.0

    Note that the documentation says should. Not having #:kivy at the start of your kv is not an error. The software that you are using is incorrectly calling that an error. But to satisfy that software, just copy the line from the documentation as the first line of your kv file.