Overdrivr / Telemetry

Data visualization and communication with embedded devices
MIT License
136 stars 27 forks source link

:> Exception in thread Thread-1: Traceback (most recent call last): #25

Closed LucasMahieu closed 8 years ago

LucasMahieu commented 8 years ago

The program was running a loop in which I was plotting 3 variables. The loop continue while à push a button. and when I pushed the button this error append. and no more variable were received ...

:> Exception in thread Thread-1: Traceback (most recent call last): File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/threading.py", line 862, in run self._target(_self._args, *_self._kwargs) File "/usr/local/lib/python3.5/site-packages/pytelemetrycli/runner.py", line 43, in run self.telemetryWrapper.update() File "/usr/local/lib/python3.5/site-packages/pytelemetry/pytelemetry.py", line 65, in update self.api.update() File "/usr/local/lib/python3.5/site-packages/pytelemetry/telemetry/telemetry.py", line 145, in update self.delimiter.decode(c) File "/usr/local/lib/python3.5/site-packages/pytelemetry/telemetry/framing.py", line 52, in decode self.on_frame_decoded_callback(self.payload) File "/usr/local/lib/python3.5/site-packages/pytelemetry/telemetry/telemetry.py", line 148, in _on_frame_detected topic_data = self._decode_frame(frame) File "/usr/local/lib/python3.5/site-packages/pytelemetry/telemetry/telemetry.py", line 121, in _decode_frame data, = unpack_from(fmt, frame, i+1) struct.error: unpack_from requires a buffer of at least 8 bytes

Overdrivr commented 8 years ago

This is a problem with pytelemetrycli. Looks like a badly formatted frame, without logs I cannot figure what is going on. Logging is now fully implemented, I just need to make the release on pypi.

Could you post the embedded code that communicates with the command line interface ? It could help me understand what is going on

Overdrivr commented 8 years ago

In the future, please post issues related with the command line interface in the right repository for clarity ;)

Overdrivr commented 8 years ago

Fixed by https://github.com/Overdrivr/pytelemetry/commit/f1648e46a8931386ce99ab7498eef34530b12429