TSharkCrashException:在以下函数中忽略了异常:<function capture .__ del __ =“” at =“” 0x01f237c8 =“”>

时间:2019-04-10 16:52:29

标签: python-3.x pyshark

发生以下异常

Exception ignored in: <function Capture.__del__ at 0x0229A930>
Traceback (most recent call last):
  File "C:\Users\ab\PycharmProjects\untitled1\venv\lib\site-packages\pyshark\capture\capture.py", line 412, in __del__
  File "C:\Users\ab\PycharmProjects\untitled1\venv\lib\site-packages\pyshark\capture\capture.py", line 403, in close
  File "C:\Users\ab\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 584, in run_until_complete
  File "C:\Users\ab\PycharmProjects\untitled1\venv\lib\site-packages\pyshark\capture\capture.py", line 407, in _close_async
  File "C:\Users\ab\PycharmProjects\untitled1\venv\lib\site-packages\pyshark\capture\capture.py", line 400, in _cleanup_subprocess
pyshark.capture.capture.TSharkCrashException: TShark seems to have crashed (retcode: 1). Try rerunning in debug mode [ capture_obj.set_debug() ] or try updating tshark.


尝试使用这对代码解决问题没有帮助

try:
 for packet in capture.sniff_continuously(packet_count=2000):
    print('Just arrived:', packet)
except TSharkCrashException:
           print("something went wrong")
except:
           print("Something went wrong")

导致问题的部分代码是

for packet in capture.sniff_continuously(packet_count=2000):
    print('Just arrived:', packet)

0 个答案:

没有答案