srt-gpt-translator
srt-gpt-translator copied to clipboard
UnicodeEncodeError
Tried to translate to Korean. It failed.
0%| | 0/77 [00:00<?, ?it/s]
Traceback (most recent call last):
File "C:\Users\Max\desktop\srt-gpt-translator\srt_translation.py", line 192, in <module>
print((short_text))
File "C:\Python311\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 '\ufeff' in position 0: character maps to <undefined>
Same issue here, I found a manual way to fix this...
Open the file with "notepad" and go to "File -> Save As", change the Codification to UTF-8.
But in my case the script gets freeze (maybe because i've reached the limit on chatgpt)