Skip to content

Commit

Permalink
fix: remind user to install ffmpeg when an audio file is not found
Browse files Browse the repository at this point in the history
The error is usually misleading: a file not found triggers a click error
long before the exception in audio_utils.py more likely means ffprobe
and ffmpeg are not found.
  • Loading branch information
joanise committed Aug 23, 2024
1 parent 6fa849f commit 0533b4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readalongs/audio_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ def read_audio_from_file(path: str) -> AudioSegment:
except Exception as e:
# need repr(e) here instead of e since these exceptions don't all have messages
raise RuntimeError(
"Error reading audio file %s: %s. Please make sure you "
"provide a valid audio file." % (path, repr(e))
"Error reading audio file %s: %s. Please provide a valid audio file and "
"make sure ffmpeg is installed." % (path, repr(e))
) from e

0 comments on commit 0533b4f

Please sign in to comment.