Skip to content

UnicodeEncodeError when printing emoji characters on Windows (cp1252 encoding) #29

@AtharvaDomale

Description

@AtharvaDomale

Installation Method

  • Docker (specify docker image version/tag): .._
  • Claude Desktop DXT extension (specify docker image version/tag): .._
  • Local Python setup

When does the error occur?

  • At startup
  • During tool call (specify which tool):
    • get_person_profile
    • get_company_profile
    • get_job_details
    • search_jobs
    • get_recommended_jobs
    • close_session

MCP Client Configuration

Claude Desktop Config (/Users/[username]/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "linkedin": {
      "method": "local-python",
      "command": "uv run main.py",
      "directory": "C:\\User_name\\linkedin-mcp-server"
    }
  }
}

MCP Client Logs

Claude Desktop Logs (/Users/[username]/Library/Logs/Claude/mcp-server-LinkedIn MCP Server.log):

UnicodeEncodeError: 'charmap' codec can't encode character '\u2705' in position 0: character maps to <undefined>
UnicodeEncodeError: 'charmap' codec can't encode character '\u274c' in position 2: character maps to <undefined>

Error Description

On Windows with Python 3.12, the MCP server crashes when it tries to print emoji characters like ✅ (\u2705) and ❌ (\u274c). The console uses the default cp1252 encoding, which can't represent these characters, resulting in a UnicodeEncodeError.

This causes the MCP server to exit immediately during initialization.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions