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


Groups > comp.lang.python > #89951

Exception in thread Thread-4:

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <djhon9813@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.040
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'error:': 0.07; 'variables': 0.07; 'python': 0.11; 'def': 0.12; 'thread': 0.14; 'advance!': 0.16; 'callable': 0.16; 'stats': 0.16; 'subject:Thread': 0.16; 'typeerror:': 0.16; 'exception': 0.16; 'everyone,': 0.19; 'import': 0.22; 'fixed.': 0.24; 'skip:" 30': 0.26; 'related': 0.29; 'message-id:@mail.gmail.com': 0.30; 'getting': 0.31; 'file': 0.32; 'class': 0.32; 'run': 0.32; '(most': 0.33; 'skip:_ 10': 0.34; 'could': 0.34; 'skip:s 30': 0.35; 'anybody': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'thanks': 0.36; 'error.': 0.37; 'follows:': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:\xc2 10': 0.60; 'hope': 0.61; 'new': 0.61; 'skip:* 10': 0.61; 'here': 0.66; '8bit%:100': 0.72; 'links,': 0.74; 'self.run()': 0.84; 'subject::': 0.85
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vV8ctPxBPDb6WsM4fZBaysD32Y9tfVVnjrdRRemd9bE=; b=WbI6yGUAQiTfcLqka5qKUWa6AlYA36P5Sj5Om6MYuYY5idwfLtxWv8iyVZ/4qtFaTw S5YJeQCs4RArElOWaxk7M3NrLilw+Ve1vtALbI4y2GAQ4n9SOjBvp2nVslDIrIAF7H+c j06oe12ev9IDlkPLY60r6S9QgIUUY7bPUD4tR8RfSJs62ZjPddpUjedPdckGD9aJP85i 6PUOB7UtZ4lGcb5weY3AOQIlcAoqnCRKRsi3O3E1ix3rHC1hn4VucnLVWhDFEbZwk5xF GxKs/A1rJior22HBZcGjd0FviR2yl+tKmOqu68g7+Y0ISt26hH7v13QY8Qc+rLFb6fJU nK2g==
MIME-Version 1.0
X-Received by 10.50.221.98 with SMTP id qd2mr845316igc.37.1430817820091; Tue, 05 May 2015 02:23:40 -0700 (PDT)
Date Tue, 5 May 2015 14:23:40 +0500
Subject Exception in thread Thread-4:
From david jhon <djhon9813@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=001a11347f20e7ab480515523b42
X-Mailman-Approved-At Tue, 05 May 2015 11:38:00 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.117.1430818681.12865.python-list@python.org> (permalink)
Lines 60
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1430818681 news.xs4all.nl 2939 [2001:888:2000:d::a6]:59232
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:89951

Show key headers only | View raw


[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


Thread

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

csiph-web