This article mainly introduces the Python runtimeerror:thread.__init__ () not called solution, the need for friends can refer to the
Call an error when writing a multithreaded class
RUNTIMEERROR:THREAD.__INIT__ () not called
The code is as follows:
Class Notifytread (threading. Thread):
def __init__ (self, params):
Threading. Thread.__init__ (self) #here ...
Self.params = params
def run (self):
Print "Start notify ..... ..."
Print Notify_tran (self.params)
Print "End notify ....... ..."
To initialize thread in init, and then assign a value to the parameter, you can solve it.
Which means you can't lack
Threading. Thread.__init__ (self)
This is a place to use attention.