-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Hi,
I'm a bit in a desperate situation since I'd like to resolve an issue in Agents.jl involving the Arrow.jl package on Windows but even if I tried hard I couldn't: it seems to me that in reality it could be a problem with Arrow.jl since all my (maybe poor) attempts to solve the problem failed. This is the PR trying to solve it: JuliaDynamics/Agents.jl#909.
In practice we have currently in Agents.jl here a test which performs:
# Arrow, fails on Windows (see issue #826 (https://github.com/JuliaDynamics/Agents.jl/issues/826))
if !(Sys.iswindows())
offline_run!(model, 365 * 5;
when_model = each_year,
when = six_months,
backend = :arrow,
mdata = [:flag, :year],
adata = [(:weight, mean)],
writing_interval = 3
)
adata_saved = DataFrame(Arrow.Table("adata.arrow"))
@test size(adata_saved) == (11, 2)
@test propertynames(adata_saved) == [:step, :mean_weight]
mdata_saved = DataFrame(Arrow.Table("mdata.arrow"))
@test size(mdata_saved) == (6, 3)
@test propertynames(mdata_saved) == [:step, :flag, :year]
@test size(vcat(DataFrame.(Arrow.Stream("adata.arrow"))...)) == (11, 2)
@test size(vcat(DataFrame.(Arrow.Stream("mdata.arrow"))...)) == (6, 3)
rm("adata.arrow")
rm("mdata.arrow")
@test !isfile("adata.arrow")
@test !isfile("mdata.arrow")
endOn Linux and MacOS it works fine, but on Windows the operating system refuses to remove the .arrow files giving:
ERROR: IOError: unlink("adata.arrow"): permission denied (EACCES)
Stacktrace:
[1] uv_error
@ .\libuv.jl:100 [inlined]
[2] unlink(p::String)
@ Base.Filesystem .\file.jl:972
[3] rm(path::String; force::Bool, recursive::Bool)
@ Base.Filesystem .\file.jl:283
[4] rm(path::String)
@ Base.Filesystem .\file.jl:273
[5] top-level scope
@ REPL[17]:1As you can see for Windows it is disables since we didn't manage to make it work.
It's probably necessary to describe what is the relationship between the Agents.jl function offline_run! and Arrow.jl, it is rather simple, offline_run! calls multiple times this other function:
function Agents.writer_arrow(filename, data, append)
if append
Arrow.append(filename, data)
else
Arrow.write(filename, data; file = false)
end
endI'm trying multiple ways to solve the issue, but none worked. I will try to provide an MWE if necessary.