I excute <include("C:\Users\Administrator\Desktop\ERGO.jl-main\notebooks\example.jl")>,but it reports erro.Here is part of the codes:
function main()
using Images, ImageView, DataFrames, CSV, Statistics, LinearAlgebra
import Glob
import Distributions
import JSON
import ImageMagick
using Logging
import Gtk
import DataStructures
import CSV
import Random
import StatsPlots
import ProgressMeter.@showprogress
## These are const, if you change them while this notebook is running behavior will be undefined.
const ROI_PX = 7; # --> ROI is 7*2+1 x 7*2+1 pixels
const PX_NM = 100; # 1 pixel is 100nm
const FRAMESIZE=64; # x/y dim of frame
rootpath = "../data"
@assert ispath(rootpath)
fpath = joinpath(rootpath, "sequence-MT0.N1.HD-AS-Exp-as-list");
pospath = rootpath
outdir = joinpath(rootpath, "output")
if !ispath(outdir)
mkpath(outdir)
end
@info "Using $(fpath) as inputdirectory, $(outdir) as output"
....
end
**ERROR: LoadError: LoadError: UndefVarError: @showprogress not defined**
Stacktrace:
[1] top-level scope
@ :0
[2] include(fname::String)
@ Base.MainInclude .\client.jl:444
[3] top-level scope
@ none:1
in expression starting at C:\Users\Administrator\Desktop\ERGO.jl-main\notebooks\example.jl:53
in expression starting at C:\Users\Administrator\Desktop\ERGO.jl-main\notebooks\example.jl:4
I don't know how to solve this error, could someone help me ? Thanks a lot!
don't put package loading inside function:
put them outside of your
main()
. The reason is that macro expansion happens before runtime.