Summary
On Windows, streamdeck_read_profiles can fail with:
UnicodeDecodeError: ''charmap'' codec can''t decode byte 0x8d ...
when any Stream Deck profile or page manifest.json contains non-ASCII UTF-8 content such as emoji.
Reproduction
- Create or edit a Stream Deck profile page so a page manifest contains UTF-8 text, for example:
"pastedText": "👍"
- Run the MCP server via
uvx streamdeck-mcp
- Call
streamdeck_read_profiles
Actual
The server crashes while reading profile/page manifests on Windows with a charmap / cp1252 decode error.
Expected
Profile and page manifests should load successfully regardless of UTF-8 content.
Root cause
profile_manager.py reads profile JSON with Path.read_text() without specifying an encoding, so Windows uses the process default ANSI codepage instead of UTF-8.
Affected helper:
_load_json(path) -> json.loads(path.read_text())
Proposed fix
Read and write profile manifests explicitly as UTF-8:
path.read_text(encoding="utf-8")
write_text(..., encoding="utf-8")
Notes
I reproduced this against a real Stream Deck profile where a page manifest contained "pastedText": "👍", and confirmed the failure occurs in streamdeck_read_profiles while building page refs.
Summary
On Windows,
streamdeck_read_profilescan fail with:UnicodeDecodeError: ''charmap'' codec can''t decode byte 0x8d ...when any Stream Deck profile or page
manifest.jsoncontains non-ASCII UTF-8 content such as emoji.Reproduction
"pastedText": "👍"uvx streamdeck-mcpstreamdeck_read_profilesActual
The server crashes while reading profile/page manifests on Windows with a
charmap/cp1252decode error.Expected
Profile and page manifests should load successfully regardless of UTF-8 content.
Root cause
profile_manager.pyreads profile JSON withPath.read_text()without specifying an encoding, so Windows uses the process default ANSI codepage instead of UTF-8.Affected helper:
_load_json(path)->json.loads(path.read_text())Proposed fix
Read and write profile manifests explicitly as UTF-8:
path.read_text(encoding="utf-8")write_text(..., encoding="utf-8")Notes
I reproduced this against a real Stream Deck profile where a page manifest contained
"pastedText": "👍", and confirmed the failure occurs instreamdeck_read_profileswhile building page refs.