Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using Plots fails on julia 0.7 #1560

Closed
pbouffard opened this issue Jun 14, 2018 · 17 comments
Closed

using Plots fails on julia 0.7 #1560

pbouffard opened this issue Jun 14, 2018 · 17 comments

Comments

@pbouffard
Copy link

The first error message is:

ERROR: LoadError: LoadError: UndefVarError: Date not defined

Full session:

$ exec '/Applications/Julia-0.7.app/Contents/Resources/julia/bin/julia'
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-alpha.0 (2018-05-31 00:07 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin14.5.0

(v0.7) pkg> add Plots#julia0.7
  Updating git-repo `https://github.com/JuliaPlots/Plots.jl.git`
┌ Warning: packages will require to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:817
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [91a5bcdd] ~ Plots v0.17.2+ #master [https://github.com/JuliaPlots/Plots.jl.git] ⇒ v0.17.2+ #julia0.7 [https://github.com/JuliaPlots/Plots.jl.git]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [91a5bcdd] ~ Plots v0.17.2+ #master [https://github.com/JuliaPlots/Plots.jl.git] ⇒ v0.17.2+ #julia0.7 [https://github.com/JuliaPlots/Plots.jl.git]

julia> using Plots
[ Info: Precompiling module Plots
┌ Warning: `replace(s::AbstractString, pat, f)` is deprecated, use `replace(s, pat => f)` instead.
│   caller = _parse_colorant(::String) at parse.jl:51
└ @ Colors parse.jl:51
┌ Warning: Deprecated syntax `parametric method syntax get_color_palette{C <: Colorant}(palette::Vector{C}, bgcolor::Colorant, numcolors::Integer)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/color_utils.jl:73.
│ Use `get_color_palette(palette::Vector{C}, bgcolor::Colorant, numcolors::Integer) where C <: Colorant` instead.
└ @ nothing color_utils.jl:73
WARNING: importing deprecated binding Base.@sprintf into PlotUtils.
WARNING: Base.@sprintf is deprecated: it has been moved to the standard library package `Printf`.
Add `using Printf` to your imports.
  likely near /Users/pat/.julia/packages/PlotUtils/YjED/src/color_utils.jl:151
WARNING: Base.@sprintf is deprecated: it has been moved to the standard library package `Printf`.
Add `using Printf` to your imports.
  likely near /Users/pat/.julia/packages/PlotUtils/YjED/src/color_utils.jl:155
┌ Warning: Deprecated syntax `type` at /Users/pat/.julia/packages/PlotUtils/YjED/src/color_gradients.jl:2.
│ Use `mutable struct` instead.
└ @ nothing color_gradients.jl:2
┌ Warning: Deprecated syntax `immutable` at /Users/pat/.julia/packages/PlotUtils/YjED/src/color_gradients.jl:106.
│ Use `struct` instead.
└ @ nothing color_gradients.jl:106
┌ Warning: Deprecated syntax `parametric method syntax register_gradient_colors{C <: Colorant}(name::Symbol, colors::AbstractVector{C}, color_library::Symbol = :default)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/color_gradients.jl:47.
│ Use `register_gradient_colors(name::Symbol, colors::AbstractVector{C}, color_library::Symbol = :default) where C <: Colorant` instead.
└ @ nothing color_gradients.jl:47
WARNING: importing deprecated binding Base.Void into PlotUtils.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near /Users/pat/.julia/packages/PlotUtils/YjED/src/color_gradients.jl:176
┌ Warning: `linspace(start, stop, length::Integer)` is deprecated, use `range(start, stop=stop, length=length)` instead.
│   caller = sample_evenly(::Array{ColorTypes.RGB{Float64},1}, ::Int64) at color_gradients.jl:241
└ @ PlotUtils color_gradients.jl:241
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near /Users/pat/.julia/packages/PlotUtils/YjED/src/colors.jl:8
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near /Users/pat/.julia/packages/PlotUtils/YjED/src/colors.jl:15
┌ Warning: Deprecated syntax `parametric method syntax plot_color{T <: Number}(zs::AbstractArray{T})` around /Users/pat/.julia/packages/PlotUtils/YjED/src/colors.jl:50.
│ Use `plot_color(zs::AbstractArray{T}) where T <: Number` instead.
└ @ nothing colors.jl:50
┌ Warning: Deprecated syntax `parametric method syntax plot_color{T <: Number}(zs::AbstractArray{T}, α::Number)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/colors.jl:64.
│ Use `plot_color(zs::AbstractArray{T}, α::Number) where T <: Number` instead.
└ @ nothing colors.jl:64
┌ Warning: Deprecated syntax `parametric method syntax bounding_order_of_magnitude{DT}(xspan::DT)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/ticks.jl:8.
│ Use `bounding_order_of_magnitude(xspan::DT) where DT` instead.
└ @ nothing ticks.jl:8
┌ Warning: Deprecated syntax `parametric method syntax optimize_ticks{T}(x_min::T, x_max::T; extend_ticks::Bool = false, Q = [(1.0, 1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)], k_min::Int = 2, k_max::Int = 10, k_ideal::Int = 5, granularity_weight::Float64 = (1 / 4), simplicity_weight::Float64 = (1 / 6), coverage_weight::Float64 = (1 / 3), niceness_weight::Float64 = (1 / 4), strict_span = true, span_buffer = nothing)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/ticks.jl:63.
│ Use `optimize_ticks(x_min::T, x_max::T; extend_ticks::Bool = false, Q = [(1.0, 1.0), (5.0, 0.9), (2.0, 0.7), (2.5, 0.5), (3.0, 0.2)], k_min::Int = 2, k_max::Int = 10, k_ideal::Int = 5, granularity_weight::Float64 = (1 / 4), simplicity_weight::Float64 = (1 / 6), coverage_weight::Float64 = (1 / 3), niceness_weight::Float64 = (1 / 4), strict_span = true, span_buffer = nothing) where T` instead.
└ @ nothing ticks.jl:63
┌ Warning: Deprecated syntax `parametric method syntax optimize_ticks_typed{T}(x_min::T, x_max::T, extend_ticks, Q::Vector{Tuple{Float64, Float64}}, k_min, k_max, k_ideal, granularity_weight::Float64, simplicity_weight::Float64, coverage_weight::Float64, niceness_weight::Float64, strict_span, span_buffer)` around /Users/pat/.julia/packages/PlotUtils/YjED/src/ticks.jl:75.
│ Use `optimize_ticks_typed(x_min::T, x_max::T, extend_ticks, Q::Vector{Tuple{Float64, Float64}}, k_min, k_max, k_ideal, granularity_weight::Float64, simplicity_weight::Float64, coverage_weight::Float64, niceness_weight::Float64, strict_span, span_buffer) where T` instead.
└ @ nothing ticks.jl:75
┌ Warning: Deprecated syntax ``const` declaration on local variable` around /Users/pat/.julia/packages/PlotUtils/YjED/src/ticks.jl:81.
└ @ nothing ticks.jl:81
ERROR: LoadError: LoadError: UndefVarError: Date not defined
Stacktrace:
 [1] top-level scope
 [2] include at ./boot.jl:314 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1071
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] include(::String) at /Users/pat/.julia/packages/PlotUtils/YjED/src/PlotUtils.jl:4
 [6] top-level scope
 [7] include at ./boot.jl:314 [inlined]
 [8] include_relative(::Module, ::String) at ./loading.jl:1071
 [9] include(::Module, ::String) at ./sysimg.jl:29
 [10] top-level scope
 [11] eval at ./boot.jl:316 [inlined]
 [12] eval(::Expr) at ./client.jl:394
 [13] macro expansion at ./none:3 [inlined]
 [14] top-level scope at ./<missing>:0
in expression starting at /Users/pat/.julia/packages/PlotUtils/YjED/src/ticks.jl:190
in expression starting at /Users/pat/.julia/packages/PlotUtils/YjED/src/PlotUtils.jl:35
ERROR: LoadError: Failed to precompile PlotUtils to /Users/pat/.julia/compiled/v0.7/PlotUtils/YveH.ji.
Stacktrace:
 [1] error at ./error.jl:33 [inlined]
 [2] compilecache(::Base.PkgId) at ./loading.jl:1207
 [3] _require(::Base.PkgId) at ./loading.jl:978
 [4] require(::Base.PkgId) at ./loading.jl:878
 [5] require(::Module, ::Symbol) at ./loading.jl:873
 [6] include at ./boot.jl:314 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1071
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope
 [10] eval at ./boot.jl:316 [inlined]
 [11] eval(::Expr) at ./client.jl:394
 [12] macro expansion at ./none:3 [inlined]
 [13] top-level scope at ./<missing>:0
in expression starting at /Users/pat/.julia/packages/Plots/W7G3/src/Plots.jl:13
ERROR: Failed to precompile Plots to /Users/pat/.julia/compiled/v0.7/Plots/ld3v.ji.
Stacktrace:
 [1] error at ./error.jl:33 [inlined]
 [2] compilecache(::Base.PkgId) at ./loading.jl:1207
 [3] _require(::Base.PkgId) at ./loading.jl:1007
 [4] require(::Base.PkgId) at ./loading.jl:878
 [5] require(::Module, ::Symbol) at ./loading.jl:873

julia> 
@juliohm
Copy link

juliohm commented Jun 29, 2018

Plots.jl is a dependency for visual regression tests in many packages. It would be nice to have a working version of the framework now that Julia 0.7 beta is out. Femtocleaner is working again, have you tried running it in the Plots.jl packages yet?

@RalphAS
Copy link

RalphAS commented Jun 29, 2018

See #1579

@lucagessi
Copy link

Julia is too fragmented. A lot of packages doesn't work anymore. Very sad

@daschw
Copy link
Member

daschw commented Jul 21, 2018

it should work on the master branch (]dev Plots)

@sandeep-sandhu
Copy link

sandeep-sandhu commented Aug 4, 2018

Precompiling Plots.jl fails with this message:

ERROR: LoadError: LoadError: TypeError: in SeriesAnnotations, in type definition
, expected Type, got typeof(Base.Nullable)
Stacktrace:
 [1] top-level scope at none:0
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\myhome\.julia\packages\Plots\V3tQ\src\Plot
s.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:399
 [13] top-level scope at .\none:3
in expression starting at C:\Users\myhome\.julia\packages\Plots\V3tQ\src\comp
onents.jl:438
in expression starting at C:\Users\myhome\.julia\packages\Plots\V3tQ\src\Plot
s.jl:157
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\U
sers\myhome\.julia\compiled\v0.7\Plots\ld3vC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1185
 [4] macro expansion at .\logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:941
 [6] require(::Base.PkgId) at .\loading.jl:852
 [7] macro expansion at .\logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:834

The corresponding source code in components.jl is:

mutable struct SeriesAnnotations
    strs::AbstractVector  # the labels/names
    font::Font
    baseshape::Nullable
    scalefactor::Tuple
end

@carstenbauer
Copy link

I get the same error

@mkborregaard
Copy link
Member

on master?

@carstenbauer
Copy link

I wasn't on master, sorry for the confusion. Everything works there.

@mkborregaard
Copy link
Member

JuliaLang/METADATA.jl#16449

@sandeep-sandhu
Copy link

I removed my old installation, freshly installed Julia 0.7 release, removed everything under /.julia, then re-installed Plots. It again failed on precompiling.

Am I missing some cleanup step? Why is this not pulling from the Master when I'm installing it afresh?

Here is the output:

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
WARNING: importing deprecated binding Base.Display into Plots.
WARNING: Base.Display is deprecated, use AbstractDisplay instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\types.jl:9
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:310.
└ @ C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:310
WARNING: importing deprecated binding Base.Void into Plots.
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:262
WARNING: importing deprecated binding Base.e into Plots.
WARNING: Base.e is deprecated, use e (\euler) or `Base.MathConstants.e`
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:355
WARNING: importing deprecated binding Base.Range into Plots.
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:453
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:454
WARNING: importing deprecated binding Base.@printf into Plots.
WARNING: Base.@printf is deprecated: it has been moved to the standard library p
ackage `Printf`.
Add `using Printf` to your imports.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:823
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:849
WARNING: Base.Range is deprecated, use AbstractRange instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:850
WARNING: Base.Void is deprecated, use Nothing instead.
  likely near C:\Users\myhome\.julia\packages\Plots\V3tQq\src\utils.jl:859
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:72.
└ @ C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:72
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:391.
└ @ C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:391
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:423.
└ @ C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:423
┌ Warning: Deprecated syntax `"begin" inside indexing expression` at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:491.
└ @ C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:491
┌ Warning: `linspace(start, stop, length::Integer)` is deprecated, use `range(st
art, stop=stop, length=length)` instead.
│   caller = partialcircle(::Float64, ::Float64, ::Int64, ::Float64) at componen
ts.jl:61
└ @ Plots C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:61
┌ Warning: `shift!` is deprecated, use `popfirst!` instead.
│   caller = #weave#85(::Array{Array{T,1} where T,1}, ::Function, ::Array{Tuple{
Float64,Float64},1}, ::Array{Tuple{Float64,Float64},1}) at components.jl:71
└ @ Plots C:\Users\myhome\.julia\packages\Plots\V3tQq\src\components.jl:71
WARNING: importing deprecated binding Base.Nullable into Plots.
ERROR: LoadError: LoadError: TypeError: in SeriesAnnotations, in type definition
, expected Type, got typeof(Base.Nullable)
Stacktrace:
 [1] top-level scope at none:0
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\Plo
ts.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:399
 [13] top-level scope at .\none:3
in expression starting at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\com
ponents.jl:438
in expression starting at C:\Users\myhome\.julia\packages\Plots\V3tQq\src\Plo
ts.jl:157
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to C:\U
sers\myhome\.julia\compiled\v0.7\Plots\ld3vC.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1185
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:852
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:834

@mkborregaard
Copy link
Member

Well the working version isn't out yet, that requires someone to merge the PR on Metadata. Until then, ]add Plots#master willl do it for you.

@m4r35n357
Copy link

m4r35n357 commented Aug 27, 2018

> using LinearAlgebra, SpecialFunctions, Plots, ApproxFun
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: InitError: LoadError: MethodError: no method matching show(::Base.TTY, ::MIME{Symbol("text/html")}, ::String)
Closest candidates are:
  show(::IO, ::MIME{Symbol("text/plain")}, ::Any) at sysimg.jl:195
  show(::IO, ::MIME{Symbol("text/html")}, ::Method; kwtype) at methodshow.jl:241
  show(::IO, ::MIME{Symbol("text/html")}, ::Base.MethodList) at methodshow.jl:290
  ...
Stacktrace:
 [1] display(::TextDisplay, ::MIME{Symbol("text/html")}, ::String) at ./multimedia.jl:211
 [2] display(::MIME{Symbol("text/html")}, ::String) at ./multimedia.jl:301
 [3] display(::String, ::String) at ./multimedia.jl:179
 [4] top-level scope at /home/ian/.julia/packages/Plots/ex9On/src/backends/plotly.jl:95
 [5] include at ./boot.jl:317 [inlined]
 [6] include_relative(::Module, ::String) at ./loading.jl:1038
 [7] include at ./sysimg.jl:29 [inlined]
 [8] include at /home/ian/.julia/packages/Plots/ex9On/src/Plots.jl:1 [inlined]
 [9] __init__() at /home/ian/.julia/packages/Plots/ex9On/src/init.jl:2
 [10] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:627
 [11] _require_from_serialized(::String) at ./loading.jl:678
 [12] macro expansion at ./logging.jl:317 [inlined]
 [13] _require(::Base.PkgId) at ./loading.jl:941
 [14] require(::Base.PkgId) at ./loading.jl:852
 [15] macro expansion at ./logging.jl:311 [inlined]
 [16] require(::Module, ::Symbol) at ./loading.jl:834
in expression starting at /home/ian/.julia/packages/Plots/ex9On/src/backends/plotly.jl:94
during initialization of module Plots

@mkborregaard
Copy link
Member

@m4r35n357 this issue is closed and the working version is out. If you have consistent issues, could you try just using Plots and then make a new issue with the error, as well as your version of Plots and versioninfo()?

@m4r35n357
Copy link

I'm not yet a "proper" Julia user, so I don't know how to use Plots - I was just cutting and pasting examples from module docs, but have never managed to plot anything over the last 4 months because of bad builds and dependencies. In other words, I can't help here . . . :(

@daschw
Copy link
Member

daschw commented Aug 27, 2018

@m4r35n357 I think what @mkborregaard meant is if you coul run

julia> using Plots

in Julia and post the error you get from just this call. Also you could post the output of

julia> versioninfo()

and

julia> using Pkg

julia> Pkg.status()

@m4r35n357
Copy link

m4r35n357 commented Aug 27, 2018

Just retried it after blowing away ~/.julia (again). Plots seems to build on its own. I guess the problem is caused by building along with other stuff, but then that is what most of the module docs say to do . . .

Anyway, looks like this is no longer an issue so I'll get off your cases ;) I'll maybe be able to get further now (want to try DifferentialEquations.jl examples). Cheers.

[UPDATE] just managed to get an example running and plotting for the first time!

@mkborregaard
Copy link
Member

Oh, I've never had to delete ~/.julia. But it often helps just to build again. It should only be a one-off thing (-:
Do report if you run into trouble, Plots should "Just Work" for everyone (with occasional minor glitches)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants