Skip to content

Errors resulting from incorrect character encoding for sub-processes #23

@ct-parker

Description

@ct-parker

The character encoding issue also arises in base_coder.py:

Exception in thread Thread-50 (stream_output):
Traceback (most recent call last):
  File "C:\Users\CTParker\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "C:\Users\CTParker\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CTParker\PycharmProjects\mcp_literature_eval\.venv\Lib\site-packages\metacoder\coders\base_coder.py", line 193, in stream_output
    for line in iter(pipe.readline, ""):
                ~~~~^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CTParker\AppData\Roaming\uv\python\cpython-3.13.2-windows-x86_64-none\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 6: character maps to <undefined>

The following test case triggers this error:

literature_mcp_encoding_test.yaml

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions