TerminalUserInterfaces.jl
TerminalUserInterfaces.jl copied to clipboard
Error in examples
Hi @kdheepak, I just watched your JuliaCon talk and came here to try things out. However the examples don't seem to work on my Ubuntu 18.04 machine with gnome-terminal, Julia 1.4 and TerminalUserInterfaces 0.2.0:
julia> include("barchart.jl")
[ Info: Precompiling TerminalUserInterfaces [408767e4-586b-40c7-9657-f9758988469a]
ERROR: LoadError: TERMIOSError: tcgetattr failed: Bad file descriptor
Stacktrace:
[1] tcgetattr(::RawFD, ::TERMIOS.termios) at /home/chris/.julia/packages/TERMIOS/Kvyl9/src/TERMIOS.jl:610
[2] tcgetattr(::Base.TTY, ::TERMIOS.termios) at /home/chris/.julia/packages/TERMIOS/Kvyl9/src/TERMIOS.jl:612
[3] backup_termios() at /home/chris/.julia/packages/TerminalUserInterfaces/ha2Cg/src/utils.jl:194
[4] initialize() at /home/chris/.julia/packages/TerminalUserInterfaces/ha2Cg/src/utils.jl:199
[5] main() at /home/chris/.julia/packages/TerminalUserInterfaces/ha2Cg/examples/barchart.jl:6
[6] top-level scope at /home/chris/.julia/packages/TerminalUserInterfaces/ha2Cg/examples/barchart.jl:62
[7] include(::String) at ./client.jl:439
[8] top-level scope at REPL[1]:1
in expression starting at /home/chris/.julia/packages/TerminalUserInterfaces/ha2Cg/examples/barchart.jl:62
Any thoughts on what could be causing this?
@c42f Thanks for trying it out! We are currently trying to debug this here: https://github.com/kdheepak/TERMIOS.jl/issues/5
I don't have a linux machine, but if you are interested in trying out a few things maybe we can figure out what is going on? I posted some more information on the other thread.
I have the same issue. Anyway i can help?
ERROR: LoadError: TERMIOSError: tcgetattr failed: Ungültiger Dateideskriptor
Stacktrace:
[1] tcgetattr(::RawFD, ::TERMIOS.termios) at /home/joto/.julia/packages/TERMIOS/Kvyl9/src/TERMIOS.jl:610
[2] tcgetattr(::Base.TTY, ::TERMIOS.termios) at /home/joto/.julia/packages/TERMIOS/Kvyl9/src/TERMIOS.jl:612
[3] backup_termios() at /home/joto/.julia/packages/TerminalUserInterfaces/ha2Cg/src/utils.jl:194
[4] initialize() at /home/joto/.julia/packages/TerminalUserInterfaces/ha2Cg/src/utils.jl:199
[5] main() at /home/joto/test.jl:11
[6] top-level scope at /home/joto/test.jl:165
in expression starting at /home/joto/test.jl:165
I tired things on Fedora and Ubuntu, using different version of Julia and used different terminal emulators
Thanks for the report and the offer to help. Maybe we can figure out what is different between my set up and yours:
I set up an Ubuntu VM with a fresh installation of Julia v1.5.0 and clone'd TerminalUserInterfaces's master branch:

And the barchart example seems to be working.
I'm using the changes from this commit: c4a1dd920870ffd0fdd921c6a01d3b7dce564907

I am running 1.4 Julia. I did an
add TerminalUserInterfaces#master
Cloning git-repo `https://github.com/kdheepak/TerminalUserInterfaces.jl.git`
Updating git-repo `https://github.com/kdheepak/TerminalUserInterfaces.jl.git`
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.4/Project.toml`
[408767e4] ~ TerminalUserInterfaces v0.2.0 ⇒ v0.2.0 #master (https://github.com/kdheepak/TerminalUserInterfaces.jl.git)
Updating `~/.julia/environments/v1.4/Manifest.toml`
[408767e4] ~ TerminalUserInterfaces v0.2.0 ⇒ v0.2.0 #master (https://github.com/kdheepak/TerminalUserInterfaces.jl.git)
But the problem still persists
It works on Julia 1.5.1 with [408767e4-586b-40c7-9657-f9758988469a] but not on Julia 1.4.2 with [408767e4-586b-40c7-9657-f9758988469a]
Interesting! I'll try to reproduce on my VM and see what is going on there.
I've dropped the dependency on Termios, so this issue should be resolved in v0.3.0: https://github.com/kdheepak/TerminalUserInterfaces.jl/releases/tag/v0.3.0