RuntimeError: thread.__init__() not called (Python)
Today I got a really dumb error from Python.
RuntimeError: thread.init() not called
But luckily it’s really easy to fix!
Below is the code before (with the error):
And now for the code that resolved the problem:
If you have really bad eye-sight and can’t spot the difference between the 2 code block above 😛
What we do is add the following code in the beginning of the construct – or __init__ in Python:
|
|
Also be aware that I originally did:
|
|
Which means I don’t have to instantiate it going forward using `threading.Thread`, instead I can do `Thread` alone.