What happened to my code? --too many arguments Python error--
Question: So I have following code which eventually worked until some time ago:

    
    
        import sys
        from PyQt4 import QtCore, QtGui
        from SerialMonitor import Ui_SerialMonitor
    
        class StartQT4(QtGui.QMainWindow):
            def __init__(self, parent=None):
                QtGui.QWidget.__init__(self,parent)
                self.ui = Ui_SerialMonitor()
                self.ui.setupUi(self)
                QtCore.QObject.connect(self.ui.readButton,QtCore.SIGNAL("clicked()"),self.startReading)
                QtCore.QObject.connect(self.ui.stopButton, QtCore.SIGNAL("clicked()"),self.stopReading)
    
            def startReading(self):
                print("1")
                self.ui.stopButton.isEnabled(False)
    
            def stopReading(self):
               print("2")
               self.ui.readButton.isEnabled(True)
    
       if __name__ == "__main__":
            app = QtGui.QApplication(sys.argv)
            myapp = StartQT4()
            myapp.show()
            sys.exit(app.exec_())
    

After a couple of tries this code somewhat died and now it returns:

> line 13, in **init** self.ui.button_save.isEnabled(True) TypeError:
> QWidget.isEnabled(): too many arguments

Can't actually figure out what happened. The funny thing is that other similar
codes, which worked normally before, now stopped working with the same error.


Answer: Use `setEnabled(True)` instead of `isEnabled(True)`.

