kaegi / alass

"Automatic Language-Agnostic Subtitle Synchronization"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Invalid digit found in string

archiif opened this issue · comments

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]Yuru_Camp_-_08[1080p][F77BB549].zip

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.