Я написал код который должен открыть окно ввода текста но оно открывается и сразу закрывается. Вот текст ошибки:
File "Redactor.py", line 12, in
MyApp().run()
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\lib\site-packages\kivy\app.py", line 949, in run
self._run_prepare()
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\lib\site-packages\kivy\app.py", line 919, in _run_prepare
root = self.build()
File "Redactor.py", line 9, in build
return CodeInput(Lexer = PythonLexer())
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\lib\site-packages\kivy\uix\codeinput.py", line 101, in __init__
super(CodeInput, self).__init__(**kwargs)
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\lib\site-packages\kivy\uix\textinput.py", line 527, in __init__
super(TextInput, self).__init__(**kwargs)
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\lib\site-packages\kivy\uix\behaviors\focus.py", line 367, in __init__
super(FocusBehavior, self).__init__(**kwargs)
File "C:\Users\Игорь\AppData\Local\Programs\Python\Python38-32\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)
Вот код:
from kivy.app import App
from kivy.uix.codeinput import CodeInput
from pygments.lexers import PythonLexer
class MyApp(App):
def build(self):
return CodeInput(Lexer = PythonLexer())
if __name__=="__main__":
MyApp().run()