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


Groups > comp.lang.python > #77045

Re: help! about pypcap.dispatch

References <89a67381-4e4f-4ae0-83e3-59ca48bdf619@googlegroups.com>
Date 2014-08-27 00:45 +1000
Subject Re: help! about pypcap.dispatch
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13458.1409064325.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Aug 26, 2014 at 8:44 PM,  <doit4um@gmail.com> wrote:
> Hi,
>
>    I'm using Python 2.7.6 in Centos 6.5.
>
>    I have defined
>    "p = pcap.pcap(timeout_ms=1000)
>     def function(timestamp,pkt,*args):
>    "
>    and try to run "p.dispatch(-1,function)"
>
>    and I got this:
>    p.dispatch(-1,function)
>    File "pcap.pyx", line 296, in pcap.pcap.dispatch (pcap.c:3182)
>   TypeError: raise: exception class must be a subclass of BaseException
>
>    why this happened? Anybody know how to solve it?

Where did pcap.pyx come from? What version is it? Is it something that
was written for an ancient version of Python? It might be raising a
string exception.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

help! about pypcap.dispatch doit4um@gmail.com - 2014-08-26 03:44 -0700
  Re: help! about pypcap.dispatch Chris Angelico <rosuav@gmail.com> - 2014-08-27 00:45 +1000
    Re: help! about pypcap.dispatch Simmen <doit4um@gmail.com> - 2014-08-26 20:03 -0700
    Re: help! about pypcap.dispatch Simmen <doit4um@gmail.com> - 2014-08-26 21:24 -0700

csiph-web