Skip to content

UnicodeDecodeError: 'charmap' codec can't decode byte on Windows #9

Description

@aggeloszi

Hi,

I am testing ssh_commander on a Windows environment and encountered a crash when the program tries to read the configuration file.

Error log:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 79: character maps to

Steps to Reproduce:

  1. Run ssh_commander on Windows with a servers.yaml file containing non-ASCII characters or created in a Windows environment.
  2. Execute: python ssh_commander.py --config servers.yaml list

Possible Cause:
It seems the open() function in ssh_commander.py (likely when loading the config) does not specify an encoding, defaulting to the system's locale (CP1253/charmap) instead of UTF-8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions