Answer the question
In order to leave comments, you need to log in
Why does the code snippet throw 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()
Traceback (most recent call last):
File "C:\for cheacher\sentense.py", line 82, in opr
uch()
TypeError: uch() missing 1 required positional argument: 'self'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question