junzis / pyModeS

Python decoder for Mode S and ADS-B signals
GNU General Public License v3.0
527 stars 151 forks source link

ValueError: max() arg is an empty sequence #152

Open dmpossa opened 1 year ago

dmpossa commented 1 year ago
[sdr_usr@linux sdr]$ modeslive --source rtlsdr
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 2000000.052982 Hz
Traceback (most recent call last):
  File "/home/sdr_usr/.local/lib/python3.11/site-packages/pyModeS/extra/rtlreader.py", line 193, in run
    self._read_callback(data, None)
  File "/home/sdr_usr/.local/lib/python3.11/site-packages/pyModeS/extra/rtlreader.py", line 169, in _read_callback
    messages = self._process_buffer()
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sdr_usr/.local/lib/python3.11/site-packages/pyModeS/extra/rtlreader.py", line 87, in _process_buffer
    threshold = max(frame_pulses) * 0.2
                ^^^^^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence