Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89951
| Date | 2015-05-05 14:23 +0500 |
|---|---|
| Subject | Exception in thread Thread-4: |
| From | david jhon <djhon9813@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.117.1430818681.12865.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Exception in thread Thread-4: david jhon <djhon9813@gmail.com> - 2015-05-05 14:23 +0500
csiph-web