OldGraphs.jl icon indicating copy to clipboard operation
OldGraphs.jl copied to clipboard

Error and warning when plotting graph

Open prcastro opened this issue 11 years ago • 12 comments

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)

prcastro avatar Jul 05 '14 00:07 prcastro

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.

pozorvlak avatar Jul 05 '14 11:07 pozorvlak

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

prcastro avatar Jul 06 '14 20:07 prcastro

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

pozorvlak avatar Jul 06 '14 21:07 pozorvlak

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)

bermanmaxim avatar Jul 29 '14 11:07 bermanmaxim

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

lssimoes avatar Apr 11 '16 12:04 lssimoes

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?

paulstey avatar May 02 '16 19:05 paulstey

@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

lssimoes avatar May 02 '16 21:05 lssimoes

@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?

paulstey avatar May 02 '16 21:05 paulstey

Sorry, no idea =/

lssimoes avatar May 02 '16 21:05 lssimoes

See #172

kmsquire avatar May 02 '16 22:05 kmsquire

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.

nil-8 avatar Oct 14 '16 14:10 nil-8

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?

pozorvlak avatar Oct 17 '16 09:10 pozorvlak