JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

Error during Tk callback #220

Closed haroldsoh closed 8 years ago

haroldsoh commented 9 years ago

Would appreciate some help: having a problem with Winston on a simple example. I get an Error 512 and the following:

julia> using Winston
Warning: could not import Base.Text into Tk

julia> plot(rand(10),rand(10),"bo")
error during Tk callback: 
ERROR: type cannot be constructed
 in _magform at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:441
 in _ticks_default_linear at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:508
 in _ticks at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:794
 in make at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:886
 in exterior at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1238
 in interior at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1755
 in compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1819
 in page_compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1835
 in page_compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1823
 in anonymous at /home/haroldsoh/.julia/v0.3/Winston/src/tk.jl:27
 in configure at /home/haroldsoh/.julia/v0.3/Tk/src/tkwidget.jl:247
 in init_canvas at /home/haroldsoh/.julia/v0.3/Tk/src/tkwidget.jl:408
 in anonymous at /home/haroldsoh/.julia/v0.3/Tk/src/tkwidget.jl:387
 in jl_tcl_callback at /home/haroldsoh/.julia/v0.3/Tk/src/tkwidget.jl:146
Error showing value of type FramedPlot:
ERROR: type cannot be constructed
 in _magform at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:441
 in _ticks_default_linear at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:508
 in _ticks at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:794
 in make at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:886
 in exterior at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1238
 in interior at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1755
 in compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1819
 in page_compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1835
 in page_compose at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:1823
 in anonymous at /home/haroldsoh/.julia/v0.3/Winston/src/tk.jl:27
 in display at /home/haroldsoh/.julia/v0.3/Winston/src/tk.jl:35
 in display at /home/haroldsoh/.julia/v0.3/Winston/src/Winston.jl:2775
 in display at multimedia.jl:149
 in print_response at REPL.jl:139
 in print_response at REPL.jl:124
 in anonymous at REPL.jl:586
 in run_interface at ./LineEdit.jl:1379
 in run_frontend at ./REPL.jl:818
 in run_repl at ./REPL.jl:169
 in _start at ./client.jl:400
mvkma commented 9 years ago

This is the same error as in #219 and #218.

The fixes for Julia 0.4 in d8c6aa0a3911b59443d2ed6ca2f309cf04403f0d broke compatibility with the 0.3.x versions.

I can't try in 0.3.x at the moment, but if round(Int, b) works there, we could try this instead of Int(b). This would then be compatible with 0.4 and 0.3.x

Godisemo commented 9 years ago

I had the same errors after updating all packages.

Typing

Pkg.pin("Winston", v"0.11.0")

fixed the issue for me.

heliosdrm commented 8 years ago

It's fixed in the master branch. Pkg.checkout for related packages (Winston, Tk) solves it.