sawsen11 / jrfonseca

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

[xdot] XDot crashes while trying to convert float to int. #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the attached graph.dot file in Ubuntu 14.04 with xdot.

What is the expected output? What do you see instead?
XDot opens and displays

What version of the product are you using? On what operating system?
Latest from aptitude.

Please provide any additional information below.
Stack trace:

pag@sloth:~/Code/Granary+$ xdot /tmp/graph.dot 
Traceback (most recent call last):
  File "/usr/bin/xdot", line 4, in <module>
    xdot.main()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1947, in main
    win.open_file(args[0])
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1881, in open_file
    self.set_dotcode(fp.read(), filename)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1863, in set_dotcode
    if self.widget.set_dotcode(dotcode, filename):
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1477, in set_dotcode
    self.set_xdotcode(xdotcode)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1497, in set_xdotcode
    self.graph = parser.parse()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1167, in parse
    DotParser.parse(self)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 977, in parse
    self.parse_graph()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 986, in parse_graph
    self.parse_stmt()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1032, in parse_stmt
    self.handle_node(id, attrs)
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 1142, in handle_node
    shapes.extend(parser.parse())
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 600, in parse
    x, y = s.read_point()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 501, in read_point
    y = self.read_number()
  File "/usr/lib/python2.7/dist-packages/xdot.py", line 494, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '2625.3'

Original issue reported on code.google.com by peter.goodman on 21 Apr 2014 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago
It works fine with the latest version ( https://github.com/jrfonseca/xdot.py ), 
as this issue has been fixed some time ago.

I'm not responsible for the Ubuntu package.  You should file a bug against 
Ubuntu/Debian to get the package updated.  In the meanwhile, just get the 
latest xdot.py and place it in /usr/local/bin/xdot

Original comment by Jose.R.F...@gmail.com on 22 Apr 2014 at 9:48