signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

I am trying to write some code to perform some packet sniffing with python using pyshark.I have the following piece of code:

import pyshark
print('Pyshark demo')
capture = pyshark.LiveCapture(interface='enp0s8')

However when I try to run this script I get the following stack trace:

Pyshark demo
Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/base_events.py", line 431, in __del__
  File "/usr/lib/python3.5/asyncio/unix_events.py", line 58, in close
  File "/usr/lib/python3.5/asyncio/unix_events.py", line 139, in remove_signal_handler
  File "/usr/lib/python3.5/signal.py", line 47, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

I have install pyshark.Do you have any idea what is causing this problem?

I run this on an ubuntu server 16.04

Upvotes: 6

Views: 4440

Answers (1)

Related Questions