I was using this viz.lp:
graph(T) :- time(T).
node((V,T),T) :- vertex(V), time(T).
edge((X,Y)) :- xedge(X,Y).
and got this error:
clingo robots.lp --outf=2 | clingraph --viz-encoding=test.lp --out=animate --sort=asc-int --engine=neato --dir='out' --type=digraph
Traceback (most recent call last):
File "/home/davila/miniconda2/envs/clingraph/bin/clingraph", line 10, in <module>
sys.exit(main())
File "/home/davila/miniconda2/envs/clingraph/lib/python3.10/site-packages/clingraph/__init__.py", line 402, in main
paths = save_gif(graphs,
File "/home/davila/miniconda2/envs/clingraph/lib/python3.10/site-packages/clingraph/gif.py", line 60, in save_gif
keys.sort(key = l_key, reverse = l_reverse)
ValueError: invalid literal for int() with base 10: 'default'
I was a bit lost with it, so I printed the keys variables and got:
['0', '1', '2', '3', 'default']
Only then I realized that I was somehow creating a new default graph, because the rule
edge((X,Y)) :- xedge(X,Y).
is adding the edges to that default graph.
I think it would be helpful to give some warning in this case, where the viz.lp defines some graphs, but (probably inadvertently) it also adds some edges or nodes to the default graph.
I was using this
viz.lp:and got this error:
I was a bit lost with it, so I printed the
keysvariables and got:Only then I realized that I was somehow creating a new
defaultgraph, because the ruleis adding the edges to that
defaultgraph.I think it would be helpful to give some warning in this case, where the
viz.lpdefines some graphs, but (probably inadvertently) it also adds some edges or nodes to the default graph.