kaegi / alass

"Automatic Language-Agnostic Subtitle Synchronization"
GNU General Public License v3.0
1.03k stars 52 forks source link

Error: Invalid digit found in string #28

Open archiif opened 3 years ago

archiif commented 3 years ago

This particular subtitle file caused an "Invalid digit found in string" error, is there any way to fix it?

error: processing subtitle file 'D:\[Asakura]Yuru_Camp_-_08[1080p][F77BB549].srt' failed
caused by: parsing subtitle file 'D:\[Asakura]Yuru_Camp_-_08[1080p][F77BB549].srt' failed
caused by: parsing the subtitle data failed
caused by: parse error at line `5086`
caused by: expected SubRip index line, found '<font size="15">- Do not soak in water.'
caused by: invalid digit found in string

I've included the subtitle file in the attachments: [Asakura]YuruCamp-_08[1080p][F77BB549].zip

Granshmeyr commented 3 years ago

I wanted to respond to this for reference because I had the same issue. Basically this error is caused by a broken subtitle file which therefore cannot be parsed by alass.

I'm not sure why but when I used SubtitleEdit to convert the embedded .ass subtitle track in anime.mkv to an output.srt file, it broke the subtitles. One solution was to convert the embedded .ass subtitle track to output.ass which as expected did not break the syntax of the subtitle file. This is fine because alass supports .ass files. The other solution was to "Unbreak" the broken lines in the output.srt file using SubtitleEdit so the file can at least be parsed.

TL;DR unbreak your broken subtitle file or don't break it in the first place.