Skip to content

编码问题-encoding issue #860

@XiaoHua013

Description

@XiaoHua013

Describe the bug

使用interpreter命令运行时报错编码问题
Error: Encoding issue when running the interpreter command

Reproduce

1.按docx写的运行

Expected behavior

成功运行

Screenshots

No response

Open Interpreter version

0.1.18

Python version

3.11.6

Operating System name and version

Windows 10

Additional context

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Scripts\interpreter.exe_main
.py", line 7, in
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\interpreter\core\core.py", line 23, in start_terminal_interface
start_terminal_interface(self)
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\interpreter\terminal_interface\start_terminal_interface.py", line 588, in start

terminal_interface
interpreter = apply_config(interpreter)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\interpreter\terminal_interface\utils\apply_config.py", line 17, in apply_config
config = get_config(config_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\interpreter\terminal_interface\utils\get_config.py", line 54, in get_config
config = yaml.safe_load(file)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml_init_.py", line 125, in safe_load
return load(stream, SafeLoader)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml_init_.py", line 79, in load
loader = Loader(stream)
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml\loader.py", line 34, in init
Reader.init(self, stream)
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "C:\Users\25079\AppData\Local\Programs\Python\Python311\Lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 353: illegal multibyte sequence

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions