Hello everyone, I am initializing lock and threading related variables in __init__() method of the class as follows:
from threading import Timer, Lock class miTestClass(EventMixin): def __init__(self, t, r, bw): self.statMonitorLock = Lock() #to lock the multi access threads self.statMonitorLock.acquire() statMonitorTimer = Timer(10.0, self._collectFlowStats()) #timer to collect stats statMonitorTimer.start() but I am getting following error: Exception in thread Thread-4: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 1082, in run self.function(*self.args, **self.kwargs) TypeError: 'NoneType' object is not callable I am new to python and after reading various links, I am not able to resolve this error. I hope anybody here could help me get it fixed. Many thanks in advance! Regards, David
-- https://mail.python.org/mailman/listinfo/python-list