sawsen11 / jrfonseca

Automatically exported from code.google.com/p/jrfonseca
0 stars 0 forks source link

Does not work on archlinux #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
xdot cfgfoo.dot

What is the output?
[arch@t430s-arch ~]$ xdot cfgfoo.dot 
unknown xdot opcode 't'
Traceback (most recent call last):
  File "/usr/bin/xdot", line 9, in <module>
    load_entry_point('xdot==0.5', 'gui_scripts', 'xdot')()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1947, in main
    win.open_file(args[0])
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1881, in open_file
    self.set_dotcode(fp.read(), filename)
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1863, in set_dotcode
    if self.widget.set_dotcode(dotcode, filename):
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1477, in set_dotcode
    self.set_xdotcode(xdotcode)
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1497, in set_xdotcode
    self.graph = parser.parse()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1167, in parse
    DotParser.parse(self)
  File "/usr/lib/python2.7/site-packages/xdot.py", line 977, in parse
    self.parse_graph()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 986, in parse_graph
    self.parse_stmt()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1032, in parse_stmt
    self.handle_node(id, attrs)
  File "/usr/lib/python2.7/site-packages/xdot.py", line 1142, in handle_node
    shapes.extend(parser.parse())
  File "/usr/lib/python2.7/site-packages/xdot.py", line 628, in parse
    points = self.read_polygon()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 517, in read_polygon
    x, y = self.read_point()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 501, in read_point
    y = self.read_number()
  File "/usr/lib/python2.7/site-packages/xdot.py", line 494, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '827.5'

It seems that read_code() does not work as expected.
I also tested on Fedora18. No problem whatsoever. 

python 2.7.5
archlinux kernel 3.11.6-1

Original issue reported on code.google.com by tabloid....@gmail.com on 1 Nov 2013 at 2:31

Attachments:

GoogleCodeExporter commented 9 years ago
Please run

  dot -Txdot cfgfoo.dot > cfgfoo.xdot

on both systems. Do they generate the same output?

Either way, please provide the output of this command.

Original comment by Jose.R.F...@gmail.com on 4 Nov 2013 at 7:26

GoogleCodeExporter commented 9 years ago
Quite some difference.

Original comment by tabloid....@gmail.com on 4 Nov 2013 at 7:35

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks.

There have been several changes in xdot format in recent graphviz version -- 
http://www.graphviz.org/doc/info/output.html#d:xdot -- and xdot.py was tripping 
on several of them.

This is now fixed on the top of the tree -- 
https://github.com/jrfonseca/xdot.py -- it doesn't fully handle all new 
features, but it can at least parse the new attributes without crashing, and 
warn about it.

Fully supporting the new features (text characteristics, color gradients) will 
have to be done by others as I really don't have the time.

It's not the case of the sample graph attached though.

Thanks for your help.

Original comment by Jose.R.F...@gmail.com on 5 Nov 2013 at 8:39

GoogleCodeExporter commented 9 years ago
Jose, Thanks for the fix.

Original comment by tabloid....@gmail.com on 5 Nov 2013 at 2:12