PICC-Group / pynanovna

A python library to easily read and save data from a NanoVNA.
https://pypi.org/project/pynanovna/
Other
8 stars 1 forks source link

Bad error message when no vna is connected an no playback file is passed. #2

Closed tbergkvist closed 6 months ago

tbergkvist commented 6 months ago

This error is shown when the vna is not connected and no playback file is passed:

NanoVNA not found, is it connected? Entering playback mode. Cannot set sweep in playback mode. Connect NanoVNA and restart. Cannot calibrate in playback mode. Connect NanoVNA and restart. Traceback (most recent call last): File "/Users/teo/repos/picc/signal-processing/test_fourier.py", line 44, in for s11, s21 in stream: File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynanovna/pynanovna.py", line 104, in stream_data self._stream_data() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pynanovna/pynanovna.py", line 132, in _stream_data self.worker.sweep.set_mode("CONTINOUS") ^^^^^^^^^^^ AttributeError: 'NanoVNAWorker' object has no attribute 'worker'

This is not clear and should be changed to something more informative.

tbergkvist commented 6 months ago

This is fixed now. Will be released in dist 0.0.7.