Exception in thread Thread-4:

david jhon djhon9813 at gmail.com
Tue May 5 05:23:40 EDT 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150505/fc7bc365/attachment.html>


More information about the Python-list mailing list