Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Error and warning when plotting graph #113

Open
prcastro opened this issue Jul 5, 2014 · 12 comments
Open

Error and warning when plotting graph #113

prcastro opened this issue Jul 5, 2014 · 12 comments

Comments

@prcastro
Copy link

prcastro commented Jul 5, 2014

Using Julia 0.3 (1 day old), I got the following message when runing plot(g):

WARNING: writesto(cmd,args...) is deprecated, use open(cmd,"w",args...) instead.
ERROR: could not spawn `neato -Tx11`: no such file or directory (ENOENT)
@pozorvlak
Copy link
Contributor

The warning's something that's been in the pipeline for a while, but which we should now fix - thanks! It looks like the error's occurring because you don't have GraphViz installed - we rely on GraphViz for plotting. Try installing it and see if the error goes away.

@prcastro
Copy link
Author

prcastro commented Jul 6, 2014

That solved the problem! Can I close the issue, or better leave it open until the warning is solved?
Thanks!

@pozorvlak
Copy link
Contributor

Excellent! Leave the issue open, I'll fix the warning and close it then.

@bermanmaxim
Copy link

It might be worth noting that I get a deprectated warning when plotting graphs under v0.3:

WARNING: writesto(cmd,args...) is deprecated, use open(cmd,"w",args...) instead.
 in plot at /.../.julia/v0.3/Graphs/src/dot.jl:76

(see issue julia#6948)

@lssimoes
Copy link

I'm having the following error when trying to run the first example code

julia> using Graphs
INFO: Recompiling stale cache file /home/kaslu/.julia/lib/v0.4/DataStructures.ji for module DataStructures.

julia> g = simple_graph(3)
Directed Graph (3 vertices, 0 edges)

julia> add_edge!(g, 1, 2)
edge [1]: 1 -- 2

julia> add_edge!(g, 3, 2)
edge [2]: 3 -- 2

julia> add_edge!(g, 3, 1)
edge [3]: 3 -- 1

julia> plot(g)

ERROR: could not spawn `neato -Tx11`: no such file or directory (ENOENT)

Is it related to this issue? My Julia version is

julia> versioninfo()
Julia Version 0.4.5
Commit 2ac304d (2016-03-18 00:58 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libm
  LLVM: libLLVM-3.3

@paulstey
Copy link

paulstey commented May 2, 2016

I'm having exactly the same error as @kaslusimoes using the example code he linked in the post above.

Here is my version info:

julia> versioninfo()
Julia Version 0.4.5
Commit 2ac304d (2016-03-18 00:58 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

Does anyone have a fix?

@lssimoes
Copy link

lssimoes commented May 2, 2016

@paulstey it seems to me that installing GraphViz, such as @pozorvlak said, solves the problem

I guess we could try to make a pull request changing the default error behaviour and explaining this situation whenever one encounters such issue. I'll try it myself later

@paulstey
Copy link

paulstey commented May 2, 2016

@kaslusimoes yes, that did seem to be one issue. But now I'm getting a different error message concerning x11.

julia> plot(g)
Format: "x11" not recognized. Use one of: bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz xdot xdot1.2 xdot1.4
ERROR: write: broken pipe (EPIPE)
 in yieldto at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in wait at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in stream_wait at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in uv_write at stream.jl:962
 in buffer_or_write at stream.jl:972
 in write at stream.jl:1011
 in write at ascii.jl:99
 in to_dot at /Users/pstey/.julia/v0.4/Graphs/src/dot.jl:26
 in plot at /Users/pstey/.julia/v0.4/Graphs/src/dot.jl:92

Did you have this issue?

@lssimoes
Copy link

lssimoes commented May 2, 2016

Sorry, no idea =/

@kmsquire
Copy link
Contributor

kmsquire commented May 2, 2016

See #172

@nil-8
Copy link

nil-8 commented Oct 14, 2016

Should this issue be resolved now? If I try to plot a graph, I get

ERROR: could not spawn neato -Tx11: no such file or directory (ENOENT)

Installing GraphViz fails for me but that is a different issue.

@pozorvlak
Copy link
Contributor

We could make the warning clearer, I guess, but that's already pretty penetrable (and Googleable). I'd be in favour of closing this, but I'm no longer a maintainer - thoughts, everyone?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants