JuliaGraphics / Winston.jl

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

Windows 10 LoadError print_escaped not defined #286

Open madenu opened 6 years ago

madenu commented 6 years ago

I am having a problem similar to issue #283.

I have installed Winston and done a Pkg.update(), but every time I start a Julia REPL session, I get a LoadError when I try to use the package. What is the print_escape?

Also, plots are not being automatically displayed.

_       _ _(_)_     |  A fresh approach to technical computing
(_)     | (_) (_)    |  Documentation: https://docs.julialang.org
_ _   _| |_  __ _   |  Type "?help" for help.
| | | | | | |/ _` |  |
| | |_| | | | (_| |  |  Version 0.6.2 (2017-12-13 18:08 UTC)
_/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-w64-mingw32

julia> using Winston
ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: print_escaped not defined
Stacktrace:
[1] init() at C:\Julia\pkgs-0.6.2.1\v0.6\Tk\src\tkwidget.jl:49
[2] include_from_node1(::String) at .\loading.jl:576
[3] include(::String) at .\sysimg.jl:14
[4] include_from_node1(::String) at .\loading.jl:576
[5] eval(::Module, ::Any) at .\boot.jl:235
[6] _require(::Symbol) at .\loading.jl:490
[7] require(::Symbol) at .\loading.jl:405
[8] include_from_node1(::String) at .\loading.jl:576
[9] include(::String) at .\sysimg.jl:14
[10] include_from_node1(::String) at .\loading.jl:576
[11] eval(::Module, ::Any) at .\boot.jl:235
[12] _require(::Symbol) at .\loading.jl:490
[13] require(::Symbol) at .\loading.jl:405
while loading C:\Julia\pkgs-0.6.2.1\v0.6\Tk\src\tkwidget.jl, in expression starting on line 457
while loading C:\Julia\pkgs-0.6.2.1\v0.6\Tk\src\Tk.jl, in expression starting on line 37
while loading C:\Julia\pkgs-0.6.2.1\v0.6\Winston\src\tk.jl, in expression starting on line 1
while loading C:\Julia\pkgs-0.6.2.1\v0.6\Winston\src\Winston.jl, in expression starting on line 2814

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> using Winston

julia> pw = FramedPlot()
Winston.FramedPlot(...)

julia> pw = plot(rand(100))
Winston.FramedPlot(...)

julia> display(pw)
Winston.FramedPlot(...)

julia>
ararslan commented 6 years ago

What version of Winston are you using?

madenu commented 6 years ago

It's the one that I got from doing a Pkg.add("Winston"). I think I'm using v0.13.1.


julia> Pkg.status("Winston")
 - Winston                       0.13.1
ararslan commented 6 years ago

Okay, thanks for checking. The issue seems actually to be with the Tk package, which is a dependency of Winston, rather than with Winston itself.

ararslan commented 6 years ago

Reported in Tk at https://github.com/JuliaGraphics/Tk.jl/issues/140.

paulobuchsbaum commented 6 years ago

My computer run Windows. I did the following:

In c:\Users\...\.julia\v0.6\Tk\src there is a source tkwidget.jl written in Julia. There do the follow replacements.

1) Replace print_escaped (depreciated) by escape_string. 2) Replace takebuf_string(b) (depreciated) by String(take!(b)) where b is any parameter.

After that Winston works like a charm.

Example:

using Winston
plot(rand(100))