-
Notifications
You must be signed in to change notification settings - Fork 77
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
使用poetry运行emotext报错 #3
Comments
编码问题? |
是的。Windwos 的机器应该在打开的时候可能要额外加一个编码参数,强制用 utf-8: 如果需要你可以先改一下,直接 pr 给我。或者我之后再改。 p.s. 我不假设该项目的任何代码能在 Windows 系统正确运行。尤其是 TTS 模块现在完全依赖于 macOS |
似乎要加一个encoding='utf-8' |
https://github.com/cdfmlr/emotext/blob/54a10dbb48060075846f466f92eda30d5cafff0f/emotext/emotext.py#L167 |
D:\AI Vtuber\emotext>poetry run python emotext/httpapi.py --port 9003
[emotext] pkl file unavailable, loading words from D:\AI Vtuber\emotext\emotext\data\dict.csv...
Traceback (most recent call last):
File "D:\AI Vtuber\emotext\emotext\httpapi.py", line 61, in
server = EmotextServer(host=args.host, port=args.port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI Vtuber\emotext\emotext\httpapi.py", line 25, in init
self.emotext = Emotions()
^^^^^^^^^^
File "D:\AI Vtuber\emotext\emotext\emotext.py", line 160, in init
self._words_from_dict()
File "D:\AI Vtuber\emotext\emotext\emotext.py", line 168, in _words_from_dict
self._read_dict(f)
File "D:\AI Vtuber\emotext\emotext\emotext.py", line 172, in _read_dict
reader.next() # skip header
^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 4: illegal multibyte sequence
D:\AI Vtuber\emotext>
The text was updated successfully, but these errors were encountered: