# Buggy code
def fromstring(cls, s):
    """Creates a new instance of the LsColors class from a colon-separated
    string of dircolor-valid keys to ANSI color escape sequences.
    """
    obj = cls()
    # string inputs always use default codes, so translating into
    # xonsh names should be done from defaults
    reversed_default = ansi_reverse_style(style="default")
    data = {}
    for item in s.split(":"):
        key, eq, esc = item.partition("=")
        if not eq:
            # not a valid item
            pass
        elif esc == "target":
            data[key] = ("TARGET",)
        else:
            data[key] = ansi_color_escape_code_to_name(
                esc, "default", reversed_style=reversed_default
            )
    obj._d = data
    return obj


# Traceback (ValueError)
Traceback (most recent call last):
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/main.py", line 401, in main
args = premain(argv)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/main.py", line 352, in premain
env = start_services(shell_kwargs, args)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/main.py", line 287, in start_services
cacheall=shell_kwargs.get("cacheall", False),
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/execer.py", line 62, in __init__
load_builtins(execer=self, ctx=xonsh_ctx)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/built_ins.py", line 1283, in load_builtins
builtins.__xonsh__.load(execer=execer, ctx=ctx)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/built_ins.py", line 1359, in load
self.env = Env(default_env())
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/environ.py", line 1383, in __init__
self[key] = val
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/environ.py", line 1545, in __setitem__
val = ensurer.convert(val)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/environ.py", line 450, in convert
return cls.fromstring(x)
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/environ.py", line 413, in fromstring
esc, "default", reversed_style=reversed_default
File "/home/broleo/.local/pipx/venvs/xonsh/lib/python3.7/site-packages/xonsh/ansi_colors.py", line 323, in ansi_color_escape_code_to_name
msg.format(escape_code=escape_code, names=names, name=name, n=n)
ValueError: Could not translate ANSI color code '1;5;38;5;145;48;5;124' into a known color in the palette. Specifically, the 'BOLD_SLOWBLINK_SET_FOREGROUND_5' portion of '5' in ['BOLD_', 'SLOWBLINK_', 'SET_FOREGROUND_', '5', '145', 'SET_BACKGROUND_', 'SLOWBLINK_', '124'] seems to missing.
Xonsh encountered an issue during launch
Failback to /bin/sh

# Fixed code
def fromstring(cls, s):
    """Creates a new instance of the LsColors class from a colon-separated
    string of dircolor-valid keys to ANSI color escape sequences.
    """
    obj = cls()
    # string inputs always use default codes, so translating into
    # xonsh names should be done from defaults
    reversed_default = ansi_reverse_style(style="default")
    data = {}
    for item in s.split(":"):
        key, eq, esc = item.partition("=")
        if not eq:
            # not a valid item
            pass
        elif esc == "target":
            data[key] = ("TARGET",)
        else:
            try:
                data[key] = ansi_color_escape_code_to_name(
                    esc, "default", reversed_style=reversed_default
                )
            except Exception as e:
                print("xonsh:warning:" + str(e), file=sys.stderr)
                data[key] = ("NO_COLOR",)
    obj._d = data
    return obj