Why does this code produce an error? I followed the tutorial (what I thought as perfectly):
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.core.window import Window
import random
class MainApp(App):
def build(self):
label = Label(text="Remember me:/Rebecca")
self.layout = BoxLayout(orientaion='vertical',size=(Window.width, Window.height))
self.box = BoxLayout(orientation='horizontal', spacing=50, pos=(0,500))
self.txt = TextInput(hint_text="Write here",size_hint=(.5,.1))
self.box.add_widget(self.txt)
self.layout.add_widget(self.box)
self.layout.add_widget(self.label)
return self.layout
if __name__ == '__main__':
app = MainApp()
app.run()
Error:
File "C:\Users\Rebecca.Bi\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\uix\widget.py", line 350, in __init__
super(Widget, self).__init__(**kwargs)
File "kivy\_event.pyx", line 245, in kivy._event.EventDispatcher.__init__
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
This question does not solve my problem because the solutions do not sovle my problem. I tried everything they recommended, but it still doesn't work.
Any help is greatly appreciated!