pombreda / pydot

Automatically exported from code.google.com/p/pydot
MIT License
0 stars 0 forks source link

Example some wrong with version 1.0.2 #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install pydot 1.0.2
2. compile the example 

What is the expected output? What do you see instead?
TypeError: cannot concatenate 'str' and 'int' objects

What version of the product are you using? On what operating system?
graphviz 2.18
python 2.5+
pyparsing 1.4.11
pydot 1.0.2
win vista and winxp sp2

Please provide any additional information below.

i find the example at http://dkbza.org/pydot.html like this:

import pydot 
edges=[(1,2), (1,3), (1,4), (3,4)] 
g=pydot.graph_from_edges(edges) 
g.write_jpeg('graph_from_edges_dot.jpg', prog='dot') 

but i get error

i change it like this

edges=[('1','2'), ('1','3'), ('1','4'), ('3','4')]

that is ok.

Original issue reported on code.google.com by cellinv...@gmail.com on 7 May 2008 at 3:49

GoogleCodeExporter commented 9 years ago
posible, I install it with some thing wrong.
I try it with idle
and it will give me a wrong message

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    g.write_jpeg('graph_from_edges_dot.jpg', prog='dot')
  File "build\bdist.win32\egg\pydot.py", line 1602, in <lambda>
    lambda path, f=frmt, prog=self.prog : self.write(path, format=f, prog=prog))
  File "build\bdist.win32\egg\pydot.py", line 1696, in write
    dot_fd.write(self.create(prog, format))
  File "build\bdist.win32\egg\pydot.py", line 1762, in create
    stderr=subprocess.PIPE, stdout=subprocess.PIPE)
  File "D:\tools\develop\Python25\lib\subprocess.py", line 586, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "D:\tools\develop\Python25\lib\subprocess.py", line 681, in _get_handles
    p2cread = self._make_inheritable(p2cread)
  File "D:\tools\develop\Python25\lib\subprocess.py", line 722, in _make_inheritable
    DUPLICATE_SAME_ACCESS)
TypeError: an integer is required

I can't resolve it.

Original comment by cellinv...@gmail.com on 8 May 2008 at 12:52

GoogleCodeExporter commented 9 years ago
Same Here
help please

Original comment by hasbun.c...@gmail.com on 8 Aug 2008 at 3:49

GoogleCodeExporter commented 9 years ago
i run directly from console...
 and no problem

IDLE do thats kind of stuff with many libraries

Original comment by hasbun.c...@gmail.com on 8 Aug 2008 at 3:52

GoogleCodeExporter commented 9 years ago
0.9.10 was using str() to convert the tuple members to strings before 
concatenating
them with node_prefix.

For unknown reasons, 1.0.2 was changed to no longer convert to string.  You can 
only
use strings in the tuples.

Original comment by jordan.s...@gmail.com on 23 Jan 2009 at 5:53

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 11:46

GoogleCodeExporter commented 9 years ago
Issue 17 has been merged into this issue.

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 11:54