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

Path issues for animations #1383

Closed
ChrisRackauckas opened this issue Feb 7, 2018 · 15 comments
Closed

Path issues for animations #1383

ChrisRackauckas opened this issue Feb 7, 2018 · 15 comments

Comments

@ChrisRackauckas
Copy link
Member

could not spawn `ffmpeg -v 0 -i /tmp/tmpH4Rh33/%06d.png -vf palettegen=stats_mode=diff -y /tmp/tmpH4Rh33/palette.bmp`: no such file or directory (ENOENT)
_jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at process.jl:360
#373 at process.jl:512 [inlined]
setup_stdio(::Base.##373#374{Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at process.jl:499
#spawn#372(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at process.jl:511
run(::Cmd) at process.jl:650
#buildanimation#288(::Int64, ::Int64, ::Bool, ::Function, ::String, ::String, ::Bool) at animation.jl:81
#gif#285(::Array{Any,1}, ::Function, ::Plots.Animation, ::String) at animation.jl:63
gif(::Plots.Animation) at animation.jl:63
anonymous at <missing>:?
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##100#105{String,Int64,String})() at eval.jl:75
withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:63
macro expansion at eval.jl:73 [inlined]
(::Atom.##98#103{Dict{String,Any}})() at task.jl:80

I'm getting the same error on Linux and Windows.

could not spawn `ffmpeg -v 0 -i 'C:\Users\Chris\AppData\Local\Temp\jl_B602.tmp/%06d.png' -vf palettegen=stats_mode=diff -y 'C:\Users\Chris\AppData\Local\Temp\jl_B602.tmp/palette.bmp'`: no such file or directory (ENOENT)
_jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at process.jl:360
#376 at process.jl:512 [inlined]
setup_stdio(::Base.##376#377{Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at process.jl:499
#spawn#375(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at process.jl:511
run(::Cmd) at process.jl:650
#buildanimation#288(::Int64, ::Int64, ::Bool, ::Function, ::String, ::String, ::Bool) at animation.jl:81
(::Plots.#kw##buildanimation)(::Array{Any,1}, ::Plots.#buildanimation, ::String, ::String, ::Bool) at <missing>:0
#gif#285(::Array{Any,1}, ::Function, ::Plots.Animation, ::String) at animation.jl:63
(::Plots.#kw##gif)(::Array{Any,1}, ::Plots.#gif, ::Plots.Animation, ::String) at <missing>:0
include_string(::String, ::String) at loading.jl:522
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##100#105{String,Int64,String})() at eval.jl:75
withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
didWriteToREPL(::Atom.##99#104{String,Int64,String}) at repl.jl:135
hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:69
macro expansion at eval.jl:73 [inlined]
(::Atom.##98#103{Dict{String,Any}})() at task.jl:80

I can confirm that things like C:\Users\Chris\AppData\Local\Temp\jl_B602.tmp/000004.png exist

@mkborregaard
Copy link
Member

Damn! Code?

@mkborregaard
Copy link
Member

I assume ffmpeg is in your PATH? (sorry)

@ChrisRackauckas
Copy link
Member Author

The code I was using was this:

https://stackoverflow.com/questions/48652964/using-results-from-odeproblem-while-it-is-running/48654717#48654717

The put ffmpeg in my path on Windows, I assume it installs itself on Linux? I didn't check there.

@SimonEnsemble
Copy link

My student has exactly the same problem on Windows.

@ablaom
Copy link

ablaom commented Apr 5, 2018

This looks similar (julia 0.6.2 on mac):

ERROR: could not spawn ffmpeg -v 0 -i /var/folders/4n/gvbmlhdc8xj973001s6vdyw00000gq/T/tmpPp6o2G/%06d.png -vf palettegen=stats_mode=diff -y /var/folders/4n/gvbmlhdc8xj973001s6vdyw00000gq/T/tmpPp6o2G/palette.bmp: no such file or directory (ENOENT)
Stacktrace:
[1] _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at ./process.jl:360
[2] #374 at ./process.jl:512 [inlined]
[3] setup_stdio(::Base.##374#375{Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:499
[4] #spawn#373(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:511
[5] run(::Cmd) at ./process.jl:650
[6] #buildanimation#288(::Int64, ::Int64, ::Bool, ::Function, ::String, ::String, ::Bool at /Users/anthony/.julia/v0.6/Plots/src/animation.jl:81
[7] #gif#285(::Array{Any,1}, ::Function, ::Plots.Animation, ::String) at /Users/anthony/.julia/v0.6/Plots/src/animation.jl:63
[8] gif(::Plots.Animation) at /Users/anthony/.julia/v0.6/Plots/src/animation.jl:63
[9] macro expansion at /Users/anthony/.julia/v0.6/Plots/src/animation.jl:153 [inlined]
[10] anonymous at ./:?

The code:

using Plots; pyplot()

@gif for j in 1:2
plot(1:10,randn(10))
end every 10

@blas-ko
Copy link

blas-ko commented Apr 13, 2018

I have the exact same problem on Linux using the very basics:

using Plots

@gif for i=1:10
    plot(rand(10))
end every 1 

and got

could not spawn `ffmpeg -v 0 -i /tmp/tmpchjqGs/%06d.png -vf palettegen=stats_mode=diff -y /tmp/tmpchjqGs/palette.bmp`: no such file or directory (ENOENT)

Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at ./process.jl:360
 [2] #373 at ./process.jl:512 [inlined]
 [3] setup_stdio(::Base.##373#374{Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:499
 [4] #spawn#372(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:511
 [5] run(::Cmd) at ./process.jl:650
 [6] #buildanimation#288(::Int64, ::Int64, ::Bool, ::Function, ::String, ::String, ::Bool) at /home/blaso/.julia/v0.6/Plots/src/animation.jl:81
 [7] #gif#285(::Array{Any,1}, ::Function, ::Plots.Animation, ::String) at /home/blaso/.julia/v0.6/Plots/src/animation.jl:63
 [8] gif(::Plots.Animation) at /home/blaso/.julia/v0.6/Plots/src/animation.jl:63
 [9] macro expansion at /home/blaso/.julia/v0.6/Plots/src/animation.jl:153 [inlined]
 [10] anonymous at ./<missing>:?
 [11] include_string(::String, ::String) at ./loading.jl:515

I, too, can confirm that /tmp/tmpchjqGs/000004.png does exist.

@blas-ko
Copy link

blas-ko commented Apr 13, 2018

I didn't have ffmpeg installed, so I only
sudo apt install ffmpeg
on Linux and voilá, problem solved!

This had nothing to do with Plots or julia, but it would be nice to add a warning with instructions when this happens, as standard Ubuntu (or at least mine) doesn't install ffmpeg for default.

@ablaom
Copy link

ablaom commented Apr 15, 2018

Thanks blas-k0!

On my mac I did a conda install ffmpeg and that fixed my problem reported above.

Anthony

@huckl3b3rry87
Copy link
Contributor

huckl3b3rry87 commented Aug 29, 2018

I was getting this issue as well. I forgot my system deleted a bunch of my programs including ffmpg. I reinstalled as @blas-ko suggested and it works!

Maybe this can be closed now?

@mkborregaard
Copy link
Member

I think we should investigate installing ffmpeg as a binary dependency.

@daschw
Copy link
Member

daschw commented Aug 29, 2018

I agree.

@logankilpatrick
Copy link

How do I add ffmpeg into my PATH?

@djsegal
Copy link
Contributor

djsegal commented May 17, 2019

Maybe make a comment about this in the docs? I tried to do this two months ago and just gave up.

// would have been nice to know i was just a brew install ffmpeg away from working animations

@mkborregaard
Copy link
Member

Would be good to solve with this: #2030

@logankilpatrick
Copy link

logankilpatrick commented Jul 7, 2019 via email

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

9 participants