TerminalUserInterfaces.jl icon indicating copy to clipboard operation
TerminalUserInterfaces.jl copied to clipboard

Error in examples

Open c42f opened this issue 5 years ago • 9 comments

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 avatar Jul 30 '20 07:07 c42f

@c42f Thanks for trying it out! We are currently trying to debug this here: https://github.com/kdheepak/TERMIOS.jl/issues/5

kdheepak avatar Jul 30 '20 07:07 kdheepak

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.

kdheepak avatar Jul 30 '20 07:07 kdheepak

I have the same issue. Anyway i can help?

freemin7 avatar Sep 06 '20 22:09 freemin7

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

freemin7 avatar Sep 06 '20 22:09 freemin7

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:

ubuntu-tuijl mov

And the barchart example seems to be working.

kdheepak avatar Sep 06 '20 22:09 kdheepak

I'm using the changes from this commit: c4a1dd920870ffd0fdd921c6a01d3b7dce564907

Screen Shot 2020-09-06 at 4 54 38 PM

kdheepak avatar Sep 06 '20 22:09 kdheepak

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

freemin7 avatar Sep 07 '20 19:09 freemin7

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]

freemin7 avatar Sep 07 '20 19:09 freemin7

Interesting! I'll try to reproduce on my VM and see what is going on there.

kdheepak avatar Sep 10 '20 21:09 kdheepak

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

kdheepak avatar Jul 25 '23 14:07 kdheepak