Hello, I'm doing some testing with the Kivy framework and this error is being presented to me:
AttributeError: 'NoneType' object has no attribute 'text'
Well, follow the Python code:
class Window(BoxLayout):
text = StringProperty('Nome')
screen_manager = ScreenManager()
def __init__(self, **kwargs):
super(Window, self).__init__(**kwargs)
class Main(App):
def build(self):
return Window()
if __name__ == '__main__':
Main().run()
And the code in KV language :
<Window>:
Screen:
BoxLayout:
Button:
text: app.root.text