Plots.jl: Failed to Precompile Plots due to LoadError

Created on 11 Feb 2020  Â·  6Comments  Â·  Source: JuliaPlots/Plots.jl

Every time I try to use the Plots package( simply by writing "using Plots") it gives me this error:

┌ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
â”” @ Base loading.jl:1273
ERROR: LoadError: syntax: invalid character "" near column 1
Stacktrace:
[1] top-level scope at C:\Users\Daniel.julia\packages\StatsBase\DyWPR\src\StatsBase.jl:1
[2] include at .\boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at .\loading.jl:1105
[4] include(::Module, ::String) at .\Base.jl:31
[5] top-level scope at none:2
[6] eval at .\boot.jl:330 [inlined]
[7] eval(::Expr) at .\client.jl:425
[8] top-level scope at .\none:3
in expression starting at C:\Users\Daniel.julia\packages\StatsBase\DyWPR\src\StatsBase.jl:1
ERROR: LoadError: Failed to precompile StatsBase [2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91] to C:\Users\Daniel.julia\compiled\v1.3\StatsBase\EZjIG_RTdTZ.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283
[3] _require(::Base.PkgId) at .\loading.jl:1024
[4] require(::Base.PkgId) at .\loading.jl:922
[5] require(::Module, ::Symbol) at .\loading.jl:917
[6] include at .\boot.jl:328 [inlined]
[7] include_relative(::Module, ::String) at .\loading.jl:1105
[8] include(::Module, ::String) at .\Base.jl:31
[9] top-level scope at none:2
[10] eval at .\boot.jl:330 [inlined]
[11] eval(::Expr) at .\client.jl:425
[12] top-level scope at .\none:3
in expression starting at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\Plots.jl:19

I'm new to Julia and I don't know what to do. I'm using Windows 8.1 64 bits

Most helpful comment

I have a similar issue, but here the culprit is RecipesBase:
```julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
WARNING: could not import RecipesBase.is_explicit into Plots
ERROR: LoadError: LoadError: UndefVarError: is_explicit not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./Base.jl:13
[2] top-level scope at /Users/uma/.julia/packages/Plots/12uaJ/src/types.jl:60
[3] include at ./boot.jl:328 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1105
[5] include at ./Base.jl:31 [inlined]
[6] include(::String) at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:1
[7] top-level scope at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:166
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1105
[10] include(::Module, ::String) at ./Base.jl:31
[11] top-level scope at none:2
[12] eval at ./boot.jl:330 [inlined]
[13] eval(::Expr) at ./client.jl:425
[14] top-level scope at ./none:3
in expression starting at /Users/uma/.julia/packages/Plots/12uaJ/src/types.jl:60
in expression starting at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:166
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/uma/.julia/compiled/v1.3/Plots/ld3vC_m55sM.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
[3] _require(::Base.PkgId) at ./loading.jl:1024
[4] require(::Base.PkgId) at ./loading.jl:922
[5] require(::Module, ::Symbol) at ./loading.jl:917

Status:
Status `~/.julia/environments/v1.3/Project.toml`

[91a5bcdd] Plots v0.29.1
[3cdcf5f2] RecipesBase v0.8.0
```
Julia version is 1.3.1, this is on a Mac with current OS.

All 6 comments

Hm, weird, looks like julia fails to precompile StatsBase (https://github.com/JuliaStats/StatsBase.jl). What are the versions of your installed packages? (Enter julias pkg mode with ] in the REPL and type st to see the version of all packages in the project or st Plots, st StatsBase to see the verison of individual packages.
Hint: here on github you can put ``` around code blocks to print them nicely.

I'm using Julia 1.3.1 and I checked my packages:
Plots:

Status C:\Users\Daniel\.julia\environments\v1.3\Project.toml
[c87230d0] FFMPEG v0.2.3 #tmp (https://github.com/giordano/FFMPEG.jl)
[91a5bcdd] Plots v0.29.1

Status C:\Users\Daniel\.julia\environments\v1.3\Project.toml
[2913bbd2] StatsBase v0.32.0

I have a similar issue, but here the culprit is RecipesBase:
```julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
WARNING: could not import RecipesBase.is_explicit into Plots
ERROR: LoadError: LoadError: UndefVarError: is_explicit not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./Base.jl:13
[2] top-level scope at /Users/uma/.julia/packages/Plots/12uaJ/src/types.jl:60
[3] include at ./boot.jl:328 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1105
[5] include at ./Base.jl:31 [inlined]
[6] include(::String) at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:1
[7] top-level scope at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:166
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1105
[10] include(::Module, ::String) at ./Base.jl:31
[11] top-level scope at none:2
[12] eval at ./boot.jl:330 [inlined]
[13] eval(::Expr) at ./client.jl:425
[14] top-level scope at ./none:3
in expression starting at /Users/uma/.julia/packages/Plots/12uaJ/src/types.jl:60
in expression starting at /Users/uma/.julia/packages/Plots/12uaJ/src/Plots.jl:166
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /Users/uma/.julia/compiled/v1.3/Plots/ld3vC_m55sM.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
[3] _require(::Base.PkgId) at ./loading.jl:1024
[4] require(::Base.PkgId) at ./loading.jl:922
[5] require(::Module, ::Symbol) at ./loading.jl:917

Status:
Status `~/.julia/environments/v1.3/Project.toml`

[91a5bcdd] Plots v0.29.1
[3cdcf5f2] RecipesBase v0.8.0
```
Julia version is 1.3.1, this is on a Mac with current OS.

Restarting the REPL seems to fix the issue, as noted in #2399

I use Julia v1.4 and have a clean install.
My computer: windows 7 x64
I have the same issue.

I don't think this issue is the same - it's a completely different error message

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crstnbr picture crstnbr  Â·  3Comments

nebuta picture nebuta  Â·  3Comments

kersulis picture kersulis  Â·  5Comments

daschw picture daschw  Â·  3Comments

PallHaraldsson picture PallHaraldsson  Â·  4Comments