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

Failed to Precompile Plots due to LoadError #2392

Closed
danielcpj opened this issue Feb 11, 2020 · 6 comments
Closed

Failed to Precompile Plots due to LoadError #2392

danielcpj opened this issue Feb 11, 2020 · 6 comments

Comments

@danielcpj
Copy link

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

@daschw
Copy link
Member

daschw commented Feb 11, 2020

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.

@danielcpj
Copy link
Author

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

@uma-hh
Copy link

uma-hh commented Feb 12, 2020

I have a similar issue, but here the culprit is RecipesBase:

[ 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.

@johnbcoughlin
Copy link

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

@fhkm
Copy link

fhkm commented Apr 15, 2020

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

@mkborregaard
Copy link
Member

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

@t-bltg t-bltg closed this as completed Sep 25, 2021
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

7 participants