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

makie.jl: ERROR: LoadError: UndefVarError: Downloads not defined #145

Closed
bardo84 opened this issue Oct 3, 2021 · 10 comments
Closed

makie.jl: ERROR: LoadError: UndefVarError: Downloads not defined #145

bardo84 opened this issue Oct 3, 2021 · 10 comments

Comments

@bardo84
Copy link

bardo84 commented Oct 3, 2021

Hi,

I get an

ERROR: LoadError: UndefVarError: Downloads not defined
Stacktrace:
 [1] top-level scope
   @ o:\Julia\makie.jl:604
in expression starting at o:\Julia\makie.jl:604

Commented out.

And on execution for all demo functions:

ERROR: UndefVarError: Options not defined
Stacktrace:
 [1] custom_plot()
   @ Main o:\Julia\makie.jl:16
 [2] top-level scope
   @ REPL[12]:1

Commented out.

On execution,

custom_plot()

no error, no plot appears.

@storopoli
Copy link
Collaborator

This could be a Julia version error. Since Downloads is a standard library module. Could you please post your Julia version and project status with package versions?

@bardo84
Copy link
Author

bardo84 commented Oct 3, 2021

Hi,
julia> VERSION
v"1.7.0-rc1"

(@v1.7) pkg> st
Status C:\Users\xxx\.julia\environments\v1.7\Project.toml
[6e4b80f9] BenchmarkTools v1.2.0
[13f3f980] CairoMakie v0.6.5
[e9467ef8] GLMakie v0.4.6
[4b11ee91] Gaston v1.0.4
[d0351b0e] InspectDR v0.4.3
[c3a54625] JET v0.5.0
[ee78f7c6] Makie v0.15.2
[961ee093] ModelingToolkit v6.5.2
[f0f68f2c] PlotlyJS v0.18.7
[91a5bcdd] Plots v1.22.3
[c46f51b8] ProfileView v0.6.10
[295af30f] Revise v3.1.20
[276b4fcb] WGLMakie v0.4.6

@storopoli
Copy link
Collaborator

I haven’t played yet with Julia 1.7. @rikhuijzer any suggestions?

@rikhuijzer
Copy link
Member

rikhuijzer commented Oct 3, 2021

Hi,

I get an

ERROR: LoadError: UndefVarError: Downloads not defined
Stacktrace:
 [1] top-level scope
   @ o:\Julia\makie.jl:604
in expression starting at o:\Julia\makie.jl:604

Commented out.

And on execution for all demo functions:

ERROR: UndefVarError: Options not defined
Stacktrace:
 [1] custom_plot()
   @ Main o:\Julia\makie.jl:16
 [2] top-level scope
   @ REPL[12]:1

Commented out.

On execution,

custom_plot()

no error, no plot appears.

Hi, @bardo84. Thank you for taking a look at our book and opening an issue. To allow us to help you, could you elaborate on what you're trying to achieve?

@bardo84
Copy link
Author

bardo84 commented Oct 3, 2021

I was trying to run this file.
Maybe I did not get your question.

@rikhuijzer
Copy link
Member

I was trying to run this file. Maybe I did not get your question.

Okay. That file is part of the JDS (Julia Data Science) package. It is not intended to be run as a separate script. We explain why in Section 1.2.

Is your intention to re-create the plots and modify them ever so slightly to get the hang of plotting? In that case, it's probably easiest to run Pluto.jl and copy paste the code from this book. Of course, there are easier ways than this to do it, but I don't know what your experience level is with Julia and what development environment you are using. Pluto is the safest bet to get things running, especially when plotting is involved. An demo of Pluto with plotting is at https://www.youtube.com/watch?v=jdEqGOv8ycc.

@bardo84
Copy link
Author

bardo84 commented Oct 3, 2021

Package dependency, ok, understand.
My experience level is low in this regard.
Is there a way to write the script that it would have requested to load the package?

@rikhuijzer
Copy link
Member

rikhuijzer commented Oct 3, 2021

My experience level is low in this regard.
Is there a way to write the script that it would have requested to load the package?

Then definitely checkout Pluto.jl. It can manage package dependencies for you automatically. Also, most (if not all) of our Makie.jl plots are stand alone, meaning that you can just copy paste the code in Pluto and see the results. For example, just copy paste

using Makie
using CairoMakie
scatterlines(1:10, 1:10)

into Pluto.jl and you should see a nice plot. See the aforementioned YouTube video for instructions on how to get Pluto.jl running.

@bardo84
Copy link
Author

bardo84 commented Oct 3, 2021

OK, thx for your help!

@bardo84 bardo84 closed this as completed Oct 3, 2021
@storopoli
Copy link
Collaborator

Oh sorry. I though you were trying to run the source code for the book. Rik’s suggestions are great. Don’t hesitate to reach out the Julia’s discourse (discourse.julialang.org).

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