1

操作系统:Mac OS 10.14.16;朱莉娅版本:JuliaPro_v1.3.1-1

我在 Julia 中为绘图设置动画,当我不以 root 身份启动 JuliaPro 时,无法实现 Plots.gif 的所需功能。我最近克服了 JuliaPro 中的一个错误,在尝试通过调用sudo chown -R foo ~/.juliaPro. 如果我以自己的身份运行 JuliaPro,即不是 root,我会收到以下错误:

ERROR: LoadError: failed process: Process(`/Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/artifacts/060c5b3c7386ef4a519b0d3e45380e0b905e0bf1/bin/ffmpeg -v 0 -framerate 5 -loop 0 -i /var/folders/v1/zchgkh6j5xb77_bcw7nvk9pr0000gn/T/jl_lczuj5/%06d.png -i /var/folders/v1/zchgkh6j5xb77_bcw7nvk9pr0000gn/T/jl_lczuj5/palette.bmp -lavfi paletteuse=dither=sierra2_4a -y '{path to gif file redacted}'`, ProcessExited(1)) [1]

Stacktrace:
 [1] #run#565(::Bool, ::typeof(run), ::Cmd) at /Applications/JuliaPro-1.3.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
 [2] run at ./process.jl:438 [inlined]
 [3] (::FFMPEG.var"#4#6"{Cmd})(::String) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG/vocw2/src/FFMPEG.jl:114
 [4] (::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}})() at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG_jll/1XNMx/src/wrappers/x86_64-apple-darwin14.jl:162
 [5] withenv(::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}}, ::Pair{String,String}, ::Pair{String,String}) at ./env.jl:161
 [6] #ffmpeg#10(::Bool, ::Bool, ::typeof(ffmpeg), ::FFMPEG.var"#4#6"{Cmd}) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG_jll/1XNMx/src/wrappers/x86_64-apple-darwin14.jl:161
 [7] ffmpeg at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG_jll/1XNMx/src/wrappers/x86_64-apple-darwin14.jl:145 [inlined]
 [8] #exe#2 at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG/vocw2/src/FFMPEG.jl:113 [inlined]
 [9] #exe at ./none:0 [inlined]
 [10] ffmpeg_exe at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/FFMPEG/vocw2/src/FFMPEG.jl:125 [inlined]
 [11] #buildanimation#267(::Int64, ::Int64, ::Bool, ::Bool, ::typeof(Plots.buildanimation), ::Animation, ::String, ::Bool) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Plots/WwFyB/src/animation.jl:92
 [12] #buildanimation at ./none:0 [inlined] (repeats 2 times)
 [13] #gif#264 at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Plots/WwFyB/src/animation.jl:63 [inlined]
 [14] #gif at ./none:0 [inlined]
 [15] driveRover() at {my file}
 [16] main() at /{my file}
 [17] top-level scope at {my file} 
 [18] include_string(::Module, ::String, ::String) at /Applications/JuliaPro-1.3.1-1.app/Contents/Resources/julia/Contents/Resources/julia/lib/julia/sys.dylib:?
 [19] (::Atom.var"#139#144"{String,String,Module})() at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:138
 [20] withpath(::Atom.var"#139#144"{String,String,Module}, ::String) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/CodeTools/sf1Tz/src/utils.jl:30
 [21] withpath(::Function, ::String) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:47
 [22] #138 at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:135 [inlined]
 [23] with_logstate(::Atom.var"#138#143"{String,String,Module}, ::Base.CoreLogging.LogState) at ./logging.jl:395
 [24] with_logger at ./logging.jl:491 [inlined]
 [25] #137 at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:134 [inlined]
 [26] hideprompt(::Atom.var"#137#142"{String,String,Module}) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/repl.jl:85
 [27] macro expansion at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:133 [inlined]
 [28] macro expansion at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Media/ItEPc/src/dynamic.jl:24 [inlined]
 [29] (::Atom.var"#136#141")(::Dict{String,Any}) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/eval.jl:122
 [30] handlemsg(::Dict{String,Any}, ::Dict{String,Any}) at /Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/packages/Atom/lBERI/src/comm.jl:164
 [31] (::Atom.var"#19#21"{Array{Any,1}})() at ./task.jl:333
in expression starting at {my file}

但是当我运行 JuliaPro 作为sudogif 正确执行时......

我试图在 ffmpeg (通过 Homebrew 安装)上放置一个符号链接,/Users/connorfuhrman/.juliapro/JuliaPro_v1.3.1-1/artifacts/060c5b3c7386ef4a519b0d3e45380e0b905e0bf1/bin/但这给出了与进程失败相同的错误。

为什么 Julia 的 Plot.gif 在以 root 身份运行时会正确执行,但在定期调用时却不能正确执行?如果我 chown-ed 相关文件夹/文件,为什么会发生这种情况?

请注意,我已经从堆栈跟踪中编辑了一些不会改变相关信息的个人信息。

4

1 回答 1

0

我相信我已经解决了这个问题。是一个权限问题 - 我做了一个 chmod 来解决这个问题!

于 2020-04-27T17:43:58.950 回答