2

So I have been experimenting with kivy and I am watching videos that explain how to create a kivy style file. I have copied the code directly from the site, but I keep getting an "invalid syntax" error for my angle brackets? I don't understand why? I am using Python 3.7. And I'm writing everything in the Python idle. Kivy has been installed without any issues. I have tried spacing as well as deleting the brackets and then typing them in myself, but nothing is working. Any suggestions will be greatly appreciated. I am still new to programming so I do not know all the tricks of the trade.

Here is the code (copied exactly):

<MyGrid>:
    Label:
        text: "Name: "
Lezandra
  • 21
  • 2

2 Answers2

1

In python, ident is 4 while it is 5 in kivy language, maybe it's your problem Edit: Ident is the number of spaces you leave while pressing tab, in most IDEs it is set to 4 for python.

Sahm
  • 43
  • 1
  • 7
1

Use 'name: ' instead of "name: "

Gevezo
  • 364
  • 3
  • 17