Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89951 > unrolled thread

Exception in thread Thread-4:

Started bydavid jhon <djhon9813@gmail.com>
First post2015-05-05 14:23 +0500
Last post2015-05-05 14:23 +0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Exception in thread Thread-4: david jhon <djhon9813@gmail.com> - 2015-05-05 14:23 +0500

#89951 — Exception in thread Thread-4:

Fromdavid jhon <djhon9813@gmail.com>
Date2015-05-05 14:23 +0500
SubjectException in thread Thread-4:
Message-ID<mailman.117.1430818681.12865.python-list@python.org>

[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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web