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

Error about finding plots.jl file #288

Closed
ssfrr opened this issue Mar 9, 2020 · 3 comments
Closed

Error about finding plots.jl file #288

ssfrr opened this issue Mar 9, 2020 · 3 comments

Comments

@ssfrr
Copy link

ssfrr commented Mar 9, 2020

It looks like Weave.jl is trying to find a file plots.jl relative to the current working directory. I my notebooks I often set the directory explicitly for searching for local resources, data etc. Recently it started throwing this error. It doesn't seem to negatively affect the operation - I still get my render out.

I'm using Weave v0.9.1, from within Atom/Juno using language-weave v0.6.7.

julia> [ Info: Weaving chunk 1 from line 41
(compiled mode) evaluation error starting at /home/sfr/research_journal/2020/02/28/full_data_sdr/no
ne:0
  could not open file /home/sfr/research_journal/2020/02/28/full_data_sdr/plots.jl
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] top-level scope at none:0
while evaluating
begin
    Base.include(Main, "plots.jl")
    __pkguuid__ = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
end
in module Weave
@ssfrr
Copy link
Author

ssfrr commented Mar 9, 2020

whoops, just realized I'm not on the latest Weave.jl. Updating seems to have resolve the issue. Sorry for the noise!

@ssfrr ssfrr closed this as completed Mar 9, 2020
@ssfrr
Copy link
Author

ssfrr commented Mar 9, 2020

Whoops, actually after a fresh Julia reboot it seems I'm seeing the issue again.

@ssfrr ssfrr reopened this Mar 9, 2020
@shg
Copy link

shg commented Mar 13, 2020

I see the same. Base.include in the __init__() function in Weave.jl seems to search the file to include in the current directory instead of in the Weave module directory. The following fix solved the issue here.

function __init__()
    @require Plots="91a5bcdd-55d7-5caf-9e0b-520d859cae80" Base.include(Main, joinpath(dirname(pathof(Weave)), "plots.jl"))
    @require Gadfly="c91e804a-d5a3-530f-b6f0-dfbca275c004" Base.include(Main, joinpath(dirname(pathof(Weave)), "gadfly.jl"))
end

shg added a commit to shg/Weave.jl that referenced this issue Mar 13, 2020
aviatesk added a commit that referenced this issue Mar 17, 2020
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

3 participants