Comments (11)
Does this happen each time or just occasionally?
from pyshark.
Each time.
from pyshark.
This doesn't happen to me on Windows or Ubuntu. I'm assuming you're on OSX?
It's obviously something wrong with the recipe of InterruptibleThread. I'll try checking it out.
from pyshark.
Yep, OS X - thanks!
from pyshark.
I have the same problem on Fedora 19 with Python 2.7.5.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyshark/capture/live_capture.py", line 44, in sniff
sniff_thread.raise_exc(StopIteration)
File "pyshark/utils.py", line 81, in raise_exc
_async_raise(self._get_my_tid(), exctype)
File "pyshark/utils.py", line 28, in _async_raise
raise ValueError("invalid thread id")
ValueError: invalid thread id
from pyshark.
Sorry for the incredibly long delay, but I changed the implementation a tad-- it still works properly on my systems and I think it may solve it for yours. Can you check?
from pyshark.
In the meanwhile I have upgrade my fedora to fedora 20 and I'm not able to reproduce the error :S I got this traceback that is probable due to other error...
Python 2.7.5 (default, Feb 19 2014, 13:47:28)
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyshark
>>> capture = pyshark.LiveCapture(interface='wlp3s0')
>>> capture.sniff(timeout=50)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 764, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/site-packages/pyshark-0.2.2- py2.7.egg/pyshark/capture/live_capture.py", line 57, in _sniff_in_thread
proc = self._get_tshark_process(packet_count)
File "/usr/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/capture/capture.py", line 97, in _get_tshark_process
parameters = [get_tshark_path(), '-T', 'pdml'] + self.get_parameters(packet_count=packet_count) + extra_params
File "/usr/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/tshark/tshark.py", line 20, in get_tshark_path
config = get_config()
File "/usr/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/config.py", line 8, in get_config
return py.iniconfig.IniConfig(CONFIG_PATH)
File "/usr/lib/python2.7/site-packages/py-1.4.20-py2.7.egg/py/_iniconfig.py", line 50, in __init__
f = open(self.path)
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/config.ini'
I hope that could be useful...
from pyshark.
I'm assuming you're running the latest revision? Did you try rerunning setup.py install?
from pyshark.
I'm getting the same error after the update:
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import pyshark
capture = pyshark.LiveCapture(interface='en0')
capture.sniff(timeout=10)
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/capture/live_capture.py", line 42, in sniff
sniff_thread.raise_exc(StopIteration)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/utils.py", line 84, in raise_exc
_async_raise(self._get_my_tid(), exctype)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyshark-0.2.2-py2.7.egg/pyshark/utils.py", line 28, in _async_raise
raise ValueError("invalid thread id")
ValueError: invalid thread id
from pyshark.
Can you try it again after jeffito's fix?
from pyshark.
Since we no longer use threads, I doubt this occurs anymore.
from pyshark.
Related Issues (20)
- No captures or accompanying errors in Ubuntu HOT 1
- Windows: no running event loop, when using pyshark.FileCapture() HOT 3
- Difference between Packet length and captured_length attributes
- Unable to access certain parts in Wi-Fi6
- Lack of proper Documentatuon HOT 2
- Getting UnknownInterfaceException in docker while tshark works
- get all dns answers from a dns packet HOT 2
- Wireshark to Neo4j for analysis
- How to utilize In-Memory Processing while live capture
- Finding protocols in base layers
- Make it possible to supply arguments to dumpcap
- Release the latest code please
- Inform the user of unsupported protocol usage
- FIFO pipe files are left open after using LiveCapture.sniff()
- duplicate keys in JSON objects are lost HOT 1
- x509af_notafter and x509af_notbefore yielding vague data
- pyshark fails to parse the tls.handshake_certificates into actual certificate data.(pyshark无法解析tls.handshake_certificates为实际证书数据) HOT 1
- Unable to retrieve duplicate layers HOT 1
- Adding Test Coverage to Cover the fields.py file for LayerField and LayerFieldsContainer classes
- Use of depreciated class SafeChildWatcher in capture.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyshark.