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

ERROR: could not spawn displaz #14

Closed
juliohm opened this issue Feb 7, 2017 · 8 comments
Closed

ERROR: could not spawn displaz #14

juliohm opened this issue Feb 7, 2017 · 8 comments

Comments

@juliohm
Copy link

juliohm commented Feb 7, 2017

When I try to run the simple example in the README:

using Displaz

plot3d!(10*randn(3,100000))

ERROR: could not spawn displaz -script -server default -label 'Points [100000 vertices]' -shader generic_points.glsl -rmtemp /tmp/juliaH7jSmY.ply: no such file or directory (ENOENT)
in _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at ./process.jl:321
in #412 at ./process.jl:478 [inlined]
in setup_stdio(::Base.##412#413{Cmd,Ptr{Void},Base.Process}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:466
in #spawn#411(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}, ::Bool, ::Bool) at ./process.jl:477
in run(::Cmd) at ./process.jl:591
in #plot3d#9(::Array{Int64,1}, ::Array{Float64,1}, ::Array{Int64,1}, ::Void, ::Array{Int64,1}, ::Bool, ::Array{Any,1}, ::Function, ::Displaz.DisplazWindow, ::Array{Float64,2}) at /home/juliohm/.julia/v0.5/Displaz/src/Displaz.jl:327
in (::Displaz.#kw##plot3d)(::Array{Any,1}, ::Displaz.#plot3d, ::Displaz.DisplazWindow, ::Array{Float64,2}) at ./:0
in #plot3d!#13(::Array{Any,1}, ::Function, ::Displaz.DisplazWindow, ::Array{Float64,2}) at /home/juliohm/.julia/v0.5/Displaz/src/Displaz.jl:341
in plot3d!(::Displaz.DisplazWindow, ::Array{Float64,2}) at /home/juliohm/.julia/v0.5/Displaz/src/Displaz.jl:341
in #plot3d!#14(::Array{Any,1}, ::Function, ::Array{Float64,2}) at /home/juliohm/.julia/v0.5/Displaz/src/Displaz.jl:346
in plot3d!(::Array{Float64,2}) at /home/juliohm/.julia/v0.5/Displaz/src/Displaz.jl:346

@juliohm
Copy link
Author

juliohm commented Feb 7, 2017

This issue is happening probably because of the file generic_points.glsl. Can you please take a look at it?

@c42f
Copy link
Owner

c42f commented Feb 7, 2017

Did you install displaz itself (https://github.com/c42f/displaz), and is it accessible in your path?

@juliohm
Copy link
Author

juliohm commented Feb 7, 2017

Hi @c42f , I had everything installed correctly, but not in the system path. I did read the deps/build.jl file and have defined DISPLAZ_CMD instead in my .juliarc.jl thinking that this would be enough.

I then erased DISPLAZ_CMD from .juliarc.jl and added /opt/displaz/bin to my path. Everything is working now.

Maybe there is a bug in the way this variable is being used? Is it deprecated?

I am closing the issue for now.

@juliohm juliohm closed this as completed Feb 7, 2017
@c42f
Copy link
Owner

c42f commented Feb 8, 2017

Ok, that makes sense. You've got a few options here:

  • Put displaz in your PATH, or get DISPLAZ_CMD into the ENV map before you run using Displaz.
  • Call set_displaz_cmd() after running using Displaz.

@juliohm
Copy link
Author

juliohm commented Feb 8, 2017

Thanks @c42f , I solved it with the PATH for now, but it seems that the DISPLAZ_CMD approach is not working, worth checking it in another machine.

@c42f
Copy link
Owner

c42f commented Feb 8, 2017

Seems to work for me, for instance, I can break it by adding "DISPLAZ_CMD" to the environment as follows

julia> ENV["DISPLAZ_CMD"] = "asdf"
"asdf"

julia> using Displaz

julia> plot3d(randn(3,1000))
ERROR: could not spawn `asdf -script -add -server default -label 'Points [1000 vertices]' -shader generic_points.glsl -rmtemp /tmp/juliayz39mb.ply`: no such file or directory (ENOENT)
 in _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::RawFD, ::RawFD, ::RawFD) at ./process.jl:321
 in #412 at ./process.jl:478 [inlined]
 in setup_stdio(::Base.##412#413{Cmd,Ptr{Void},Base.Process}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:466
 in #spawn#411(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}, ::Bool, ::Bool) at ./process.jl:477
 in run at ./process.jl:591 [inlined]
 in #plot3d#9(::Array{Int64,1}, ::Array{Float64,1}, ::Array{Int64,1}, ::Void, ::Array{Int64,1}, ::Bool, ::Array{Any,1}, ::Function, ::Displaz.DisplazWindow, ::Array{Float64,2}) at /home/cfoster/.julia/v0.5/Displaz/src/Displaz.jl:326
 in plot3d(::Displaz.DisplazWindow, ::Array{Float64,2}) at /home/cfoster/.julia/v0.5/Displaz/src/Displaz.jl:279
 in #plot3d#15(::Array{Any,1}, ::Function, ::Array{Float64,2}) at /home/cfoster/.julia/v0.5/Displaz/src/Displaz.jl:346
 in plot3d(::Array{Float64,2}) at /home/cfoster/.julia/v0.5/Displaz/src/Displaz.jl:346

@juliohm
Copy link
Author

juliohm commented Feb 8, 2017

Oh, I was just creating a variable DISPLAZ_CMD = "path/to/displaz instead of setting Julia's ENV dictionary. Sorry for the noise 😊

@c42f
Copy link
Owner

c42f commented Feb 8, 2017

No problem at all. I should improve the documentation to make this clearer. The functions are individually documented, but the overview in the README is very sparse.

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

2 participants