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

请问site-packages\qpt这个包是由您维护的么? #49

Closed
qiansen1386 opened this issue Nov 8, 2021 · 1 comment
Closed

请问site-packages\qpt这个包是由您维护的么? #49

qiansen1386 opened this issue Nov 8, 2021 · 1 comment

Comments

@qiansen1386
Copy link

我本地的terminal是utf-8的codepage,我直接运行OCR会导致下面的报错

raceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\DangoTranslate-Ver3.6.2\DangoOCR-Ver1.2\Python\lib\site-packages\qpt\run.py", line 12, in <module>
    module = RunExecutableM
# ....
  File "D:\DangoTranslate-Ver3.6.2\DangoOCR-Ver1.2\Python\lib\site-packages\qpt\kernel\tools\terminal.py", line 67, in handle
    msg = line.decode('gbk').strip("b'").strip("\n").strip(SHELL_ACT)
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 47: illegal multibyte sequence

我手动把site-packages\qpt\kernel\tools\terminal.py这个文件里所有的gbk替换成utf8了就可以启动,确实国内很少有人会换code page。

我不知道这个包是由您维护的么?如果是的话,换成sys.stdout.encoding会不会更好一些?

@PantsuDango
Copy link
Owner

PantsuDango commented Nov 8, 2021 via email

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