tmuxp icon indicating copy to clipboard operation
tmuxp copied to clipboard

Show a more helpful error message if missing locales

Open tony opened this issue 3 years ago • 0 comments

ValueError: Session requires a session_id

When encountering https://github.com/tmux-python/tmuxp/discussions/757 and os.getenv doesn't show LANG, LANGUAGE and LC_ALL set, e.g. mismatching or missing attributes:

LANG=en_IN
LANGUAGE=
LC_CTYPE="en_IN"
LC_NUMERIC=en_IN.UTF-8
LC_TIME=en_IN.UTF-8
LC_COLLATE="en_IN"
LC_MONETARY=en_IN.UTF-8
LC_MESSAGES="en_IN"
LC_PAPER=en_IN.UTF-8
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT=en_IN.UTF-8
LC_IDENTIFICATION="en_IN"
LC_ALL=
  1. Find out what combination of these causes the issue
  2. When to raise a warning
  3. When an error is encountered, when to upcast the error to something more helpful to the user
  4. See if this is really something that should be done on the libtmux side

tony avatar Sep 15 '22 23:09 tony