Puyodead1 / udemy-downloader

A Udemy downloader that can download courses, with DRM support.
MIT License
1.26k stars 292 forks source link

UnicodeEncodeError: 'charmap' codec can't encode character #97

Closed mahdisky closed 2 years ago

mahdisky commented 2 years ago

What happened?

some subtitle to convert from vtt to srt

error UnicodeEncodeError: 'charmap' codec can't encode character '\u010d'

Expected Result

all sub its true

Branch

master/main

What operating systems are you seeing the problem on?

Windows

Relevant log output

[udemy-downloader] [process_caption:1301] ERROR:     > Error converting caption
Traceback (most recent call last):
  File "\main.py", line 1296, in process_caption
    convert(lecture_dir, filename_no_ext)
  File "\vtt_to_srt.py", line 17, in convert
    srt.write(
  File "Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u010d' in position 86: character maps to <undefined>

Other information

No response

Puyodead1 commented 2 years ago

I'm going to close this in favor of #98.