Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeEncodeError #9

Open
dlxmax opened this issue Sep 1, 2023 · 1 comment
Open

UnicodeEncodeError #9

dlxmax opened this issue Sep 1, 2023 · 1 comment

Comments

@dlxmax
Copy link

dlxmax commented Sep 1, 2023

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>
@ProtocolNebula
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants