Skip to content

Failed to initialize keyboard: Error while reading terminfo data:termbox: unsupported terminal #777

@offsetcyan

Description

@offsetcyan

When running the interactive Rye interpreter (v0.0.96) with a TERM environment variable not supported by termbox, it crashes with the error Failed to initialize keyboard: Error while reading terminfo data:termbox: unsupported terminal. This does not happen when feigning a terminal supported by termbox. The solution should probably involve falling back to forcing a supported terminal type, like xterm-256color, xterm or ansi. Logs to demonstrate the issue below:

[nix-shell:~/src/nixpkgs/pkgs/by-name/ry/rye-lang]$ TERM=foot rye
Welcome to Rye development console. We're still W-I-P. Visit ryelang.org for more info.
- type in lcp (list context parent) too see functions, or lc to see your context


[nix-shell:~/src/nixpkgs/pkgs/by-name/ry/rye-lang]$ cat /tmp/nix-shell-41xs5c1sprqag9wkmxai4gwzzf/build-top/rye_debug.log 
Failed to initialize keyboard: Error while reading terminfo data:termbox: unsupported terminal

[nix-shell:~/src/nixpkgs/pkgs/by-name/ry/rye-lang]$ TERM=xterm-256color rye
Welcome to Rye development console. We're still W-I-P. Visit ryelang.org for more info.
- type in lcp (list context parent) too see functions, or lc to see your context

x> Ctrl+D detected in Microliner
End of Function in REPL...
Wrote 1 history entries
Closing keyboard...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions