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

UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 270: illegal multibyte sequence #281

Open
scillidan opened this issue Nov 21, 2024 · 0 comments

Comments

@scillidan
Copy link

OS: Windows 10
Python version : 3.11.9 (pyenv)

Dude, I used epub2txt to convert file.epub to file.txt. When run:

epub2tts "D:\_epub\Thief of Souls_Neal Shusterman.txt" --engine tts --speaker "Suad Qasim" --cover C:\Users\User\Downloads\in.jpg --sayparts

It return:

Namespace(sourcefile='D:\\_epub\\Thief of Souls_Neal Shusterman.txt', engine='tts', xtts=None, openai=None, model='tts_models/en/vctk/vits', speaker='Suad Qasim', scan=False, start=1, threads=2, end=999, language='en', minratio=88, skiplinks=False, skipfootnotes=False, sayparts=True, audioformat='m4b', bitrate='69k', debug=False, export=None, no_deepspeed=False, skip_cleanup=False, cover='C:\\Users\\User\\Downloads\\in.jpg')
Language selected: en
in main, Speaker is Suad Qasim
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User\Git\epub2tts\venv\Scripts\epub2tts.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\Git\epub2tts\venv\Lib\site-packages\epub2tts.py", line 1173, in main
    mybook.get_chapters_text(
  File "C:\Users\User\Git\epub2tts\venv\Lib\site-packages\epub2tts.py", line 632, in get_chapters_text
    text = file.read()
           ^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 270: illegal multibyte sequence

And I check

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

1 participant