When i execute the function (Background) in a different directory (“User/initialization/Background.jl”) in another function (Hi.Hi_Hello), there is some error. (although code was simplified for the clarify, it would not be matter)
Hi.Hi_Hello code
module Hi
using DelimitedFiles
function Hi_Hello()
include("User/initialization/Background.jl")
Background()
end
end
using .Hi
Hi.Hi_Hello
Background code
function Background()
writedlm("Background.txt", data_BG)
end
Error: MethodError: no method matching Background()
The applicable method may be too new: running in world age 32630, while current world is 32631.
Closest candidates are:
Background() at C:\Windows\Application Data\User\initialization\Background.jl:6 (method too new to be called from this world context.)
Stacktrace:
But, when I execute the same function in the same directory, or command on the terminal, it works.
command on the terminal example:
include(“User/initialization/Background.jl”)
Background()
I don’t know why it do not work, at all.
If you give me any knowledge, it would be very helpful to me.