Why in the code snippet gives an error?

The code snippet itself:
def uch(self):
 self.uch = MyUch()
 self.uch.show() 

 def och(self):
 self.och = Myoch()
 self.och.show() 

 def opr(self):
try:
 file = open(self.lineEdit1.text() + '.txt')
 except IOError as e:
och()
else:
 uch()


Error:
Traceback (most recent call last):
 File "C:\for cheacher\sentense.py", line 82, in opr
uch()
TypeError: uch() missing 1 required positional argument: 'self'
April 3rd 20 at 18:26
1 answer
April 3rd 20 at 18:28
Wow! Oh. ODA...
I think they have a shortage of letters on the keyboard, and so they save. - Leora.Ber commented on April 3rd 20 at 18:31

Find more questions by tags PythonPyQt