IndexError: list index out of range

#1
by mcysqrd - opened

IndexError: list index out of range
Traceback:
File "/home/user/.local/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/home/user/app/app.py", line 78, in
main()
File "/home/user/app/app.py", line 60, in main
audio_src, df = caption_from_url(url)
File "/home/user/.local/lib/python3.8/site-packages/streamlit/runtime/legacy_caching/caching.py", line 627, in wrapped_func
return get_or_create_cached_value()
File "/home/user/.local/lib/python3.8/site-packages/streamlit/runtime/legacy_caching/caching.py", line 611, in get_or_create_cached_value
return_value = non_optional_func(*args, *kwargs)
File "/home/user/app/app.py", line 24, in caption_from_url
audio_src = globtastic(AUDIO_PATH, file_glob='
.mp3', file_re=v)[0]
File "/home/user/.local/lib/python3.8/site-packages/fastcore/foundation.py", line 112, in getitem
def getitem(self, idx): return self._get(idx) if is_indexer(idx) else L(self._get(idx), use_list=None)
File "/home/user/.local/lib/python3.8/site-packages/fastcore/foundation.py", line 116, in _get
if is_indexer(i) or isinstance(i,slice): return getattr(self.items,'iloc',self.items)[i]

I think this error must've come up as it could not find the downloaded mp3 file.

Currently, there are 2 major bottlenecks in this application,

  1. download speeds of videos with youtube-dl
  2. inference of the whisper model (this would become a lot faster if I had a GPU-runtime)

I'm trying to find alternatives to this, I'll what I can do in that case.

Sign up or log in to comment