cdown/srt

Keep getting "expected string or bytes-like object" error

Closed this issue · 3 comments

Hi.
While using this library on both English and Farsi subtitles, I keep getting the error in the picture.
Can you help me with that? Thank you.
11

cdown commented

As the error message says, srt.parse takes a string, not a file object.

You need sub = srt.parse(file.read())

As the error message says, srt.parse takes a string, not a file object.

You need sub = srt.parse(file.read())

Thank you so much for your help.

cdown commented

No worries! 1fbe58e will also allow this in next srt release.