jooola / earhorn

Listen, monitor and archive your Icecast streams!
GNU General Public License v3.0
10 stars 4 forks source link

List index out of range uploading to S3 #134

Closed paddatrapper closed 1 year ago

paddatrapper commented 2 years ago
2022-10-11 08:08:50.651 | DEBUG    | earhorn.stream:listen:98 - running command 'ffmpeg -hide_banner -nostats -re -vn -i https://edge.iono.fm/xice/uctradio_live_medium.aac -map 0 -af silencedetect=noise=-60dB:d=2.0 -f null /dev/null -map 0 -map_metadata -1 -f segment -strftime 1 -segment_time 600 -segment_format mp3 -segment_list segments.csv -reset_timestamps 1 incoming/segment.%Y-%m-%d-%H-%M-%S.mp3'
2022-10-11 08:08:50.683 | DEBUG    | earhorn.stream_silence:parse_process_output:85 - starting to parse stdout
Exception in thread Thread-4 (wait_for_segments):
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/venv/lib/python3.10/site-packages/earhorn/stream_archive.py", line 166, in wait_for_segments
    self.ingest_pending_segments()
  File "/opt/venv/lib/python3.10/site-packages/earhorn/stream_archive.py", line 156, in ingest_pending_segments
    self._segment_filepath(segment),
  File "/opt/venv/lib/python3.10/site-packages/earhorn/stream_archive.py", line 109, in _segment_filepath
    parts = segment.name.split(".")[1].split("-")
IndexError: list index out of range

Version: v0.13.0

paddatrapper commented 2 years ago

This was on a newly created docker instance. I guess it was trying to read from the segment file before it was created or populated?

jooola commented 2 years ago

I think it's more related to me not being defensive enough when I wrote this part of the code... I'll have a look.

jooola commented 2 years ago

Could you past the full logs please ? And the content of the earhorn working directory ?

paddatrapper commented 2 years ago

I'm trying to replicate it. Will post everything if I manage to replicate