You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/ilya/opt/programming/catbo/backend-env11/lib/python3.11/site-packages/pysrt/srtfile.py", line 153, in open
new_file.read(source_file, error_handling=error_handling)
File "/Users/ilya/opt/programming/catbo/backend-env11/lib/python3.11/site-packages/pysrt/srtfile.py", line 181, in read
self.extend(self.stream(source_file, error_handling=error_handling))
File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py", line 1324, in extend
self.data.extend(other)
File "/Users/ilya/opt/programming/catbo/backend-env11/lib/python3.11/site-packages/pysrt/srtfile.py", line 215, in stream
cls._handle_error(error, error_handling, index)
File "/Users/ilya/opt/programming/catbo/backend-env11/lib/python3.11/site-packages/pysrt/srtfile.py", line 311, in _handle_error
sys.stderr.write(error.args[0].encode('ascii', 'replace'))
TypeError: write() argument must be str, not bytes
The text was updated successfully, but these errors were encountered:
Hi,
I open .srt files with
error_handling=SubRipFile.ERROR_LOG
, and it works fine in Py2 but not in Py3.In case of a wrongly formatted srt file pysrt tries to write bytes into sys.stderr:
So we get in Py3:
The text was updated successfully, but these errors were encountered: