GithubHelp home page GithubHelp logo

yapgvb's People

Watchers

 avatar

yapgvb's Issues

Add node to graph not operating as per docs

In Digraph.add_node, it says "If a node of this name exists already, it 
will be returned and no new node will be created." . However, no check of 
this kind is made and new nodes are always created. Therefore one needs to 
keep an external dictionary to work around when one needs this 
functionality.

Original issue reported on code.google.com by [email protected] on 6 May 2009 at 8:33

pos field of nodes can be None after calling layout

What steps will reproduce the problem?
Do the following multiple times (< 10 times):

1. Generate a random graph
2. Call layout(engine='dot') on created graph (I also tried with other engines)
3. Traverse over the graph using the graph.nodes iterator and inspect the pos 
field. 

What is the expected output? What do you see instead?
Expected output is that after calling layout the pos field for all the nodes is 
set to some non-None value (i.e. a 2 tuple in my cases). 

Instead I see about every 5 graphs I create or so, None values for some or all 
nodes. 

What version of the product are you using? On what operating system?
1.2.3-0ubuntu3 on Ubuntu Lucid

Please provide any additional information below.
The return value for the layout method was 0 in all cases. 

Original issue reported on code.google.com by [email protected] on 23 Sep 2010 at 2:35

please update pypi download information

I think this used to work:

% easy_install "yapgvb==1.1.3"
Searching for yapgvb==1.1.3
Reading http://pypi.python.org/simple/yapgvb/
Reading http://yapgvb.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=158931
No local packages or download links found for yapgvb==1.1.3

(I'm actually using buildout, but I think that command has the same effect.)

Versions 1.1.1 and 1.2.0 also fail.

Please submit a new pypi registration with a working download link. It has
been very convenient to leave yapgvb in my buildout.cfg and have all my
deployments get the right code.

Original issue reported on code.google.com by drewpca on 8 Feb 2009 at 9:35

Error rendering with Python 2.6 on Mac OSX

What steps will reproduce the problem?
1. Install yapgvb 1.2.3 on Mac OSX with Python 2.6
2. Import library (works) in Python program
3. Create nodes and edges
4. Call graph.render(yapgv.engines.dot)

The code works beautifully with the Linux version of 1.2.3. graphviz
version 2.22.2 (20090313.1817) works from command line.

Following stack trace is generated:
Warning:
/var/folders/BW/BWbnQ3-vGdKGeGtWdl7cl++++TI/-Tmp-/yapgvb_temp0.dot:2:
string ran past end of line
Warning:
/var/folders/BW/BWbnQ3-vGdKGeGtWdl7cl++++TI/-Tmp-/yapgvb_temp0.dot:3:
string ran past end of line
Error:
/var/folders/BW/BWbnQ3-vGdKGeGtWdl7cl++++TI/-Tmp-/yapgvb_temp0.dot:4:
syntax error near line 4
context:     1 >>>  [ <<< color="red",fontcolor="red"];
Warning:
/var/folders/BW/BWbnQ3-vGdKGeGtWdl7cl++++TI/-Tmp-/yapgvb_temp0.dot:5:
string ran past end of line

<Above repeated til line 45>

<dot usage info>

********************************************************************************
Function:  render at
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ya
pgvb-1.2.3-py2.6.egg/yapgvb/_yapgvb_py.py:71
Calling:   result = rendering_context.render(self, format, outstream)
           ('/Library/Frameworks/Python.framework/Versions/2.6/lib/py
thon2.6/site-packages/yapgvb-1.2.3-py2.6.egg/yapgvb/__init__.py',
341, 'render')
CLIRenderError: Error code 38400 rendering
/var/folders/BW/BWbnQ3-vGdKGeGtWdl7cl++++TI/-Tmp-/yapgvb_temp0.dot
    Args:
        <yapgvb._yapgvb_py.RenderingContext object at 0xc27070> (<class
'yapgvb._yapgvb_py.RenderingContext'>)
        <Digraph "library.png">        (<class 'yapgvb.Digraph'>)
        'png'                          (<type 
'str'>)
        <closed file 'library.png', mode 'wb' at 0xdfb480> (<type 
'file'>)
    No keywords.
ERROR

======================================================================
ERROR: test that evaluation labels are correctly assigned that value
----------------------------------------------------------------------
Traceback (most recent call last):
  method testLabelParsed in test_eval.py at line 21
    techne_ops.display()
  method display in test_eval.py at line 125
    graph.render(image_name)
  method render in test_eval.py at line 341
    result = rendering_context.render(self, format, outstream)
  method fc in test_eval.py at line 61
    raise NotImplementedError("You are using the pure-Python experimental
backend.  A lot of things are not implemented yet.")
NotImplementedError: You are using the pure-Python experimental backend.  A
lot of things are not implemented yet.


Original issue reported on code.google.com by [email protected] on 10 Jun 2009 at 5:11

The label attribute on shapes doesn't support html attributes

What steps will reproduce the problem?
1. Set the label on a shape to a html text (should be valid per
http://www.graphviz.org/doc/info/shapes.html#html

What is the expected output? What do you see instead?
Html displayed inside the shape.  Instead, I simply saw the html displayed
as text.

What version of the product are you using? On what operating system?
1.2.3 (latest from SVN on Sept 4, 2009)


Original issue reported on code.google.com by [email protected] on 4 Sep 2009 at 12:12

cannot import yapgvb in windows

What steps will reproduce the problem?
1. using Activepython 2.5
2. install the old yapgvb version for 2.5
3. import yapgvb

What is the expected output? What do you see instead?
should be ok, but got error message
  File "C:\Python25\lib\site-packages\yapgvb\__init__.py", line 20, in <module>
    from _yapgvb import *
ImportError: DLL load failed: The specified module could not be found.

What version of the product are you using? On what operating system?
yapgvb-1.1.3.win32-py2.5, winXP

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Feb 2009 at 11:23

Enable support to Unicode Labels e.g. Chinese Characters

What steps will reproduce the problem?
1. Current pure python release did not support Chinese Characters in Node label.
2.
3.

What is the expected output? What do you see instead?
Simplified Chinese in Nodes' label, but I got the system Error

What version of the product are you using? On what operating system?
latest pure python release

Please provide any additional information below.

It was caused by when yapgvb generate the dot template, it just use:
   f = open(xxx, 'w,), then print >> f.
   but this kind of file did not support unicode.

It is in the file graph_attribute_types.py:
I just add the import codecs, and use:
   f = codecs.open(f, encoding='utf8', mode='w+')
then it works well.

By the way, please add the magic string:
   # -*- encoding: utf-8 -*-
so it will better compatible to unicode

Thanks and best Regards!

Original issue reported on code.google.com by [email protected] on 16 Jul 2010 at 6:57

Hide a node

I want to hide a node.

g.hide();
or, g.visibility = False;

Would be nice with a .del_node() function too.

Original issue reported on code.google.com by [email protected] on 3 Apr 2009 at 11:19

Digraph construction will occasionally throw an exception.

What steps will reproduce the problem?

1. from yapgvb import Digraph
2. Digraph('Tree')
3. Exception:

Traceback (most recent call last):
  File "/home/user/test.py", line 5, in __init__
    graph = Digraph('Tree')
  File "/usr/lib/python2.6/dist-packages/yapgvb/__init__.py", line 520, in
__init__
    if isinstance(arg, file):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
and types

Note that I intentionally modified the logs to hide my setup; I really
don't have a user called "user".

What version of the product are you using? On what operating system?

This one: yapgvb_1.2.3-0ubuntu1
http://packages.ubuntu.com/uk/karmic/python-yapgvb

This is a strange exception because it shows up the first time you run the
file (without a pyc around) and then no time after.

I tried importing yapgvb and using yapgvb.Digraph and the error seems to go
away. My guess is that the file resource (from the exception) gets loaded
when you import yapgvb but not just Digraph.

Original issue reported on code.google.com by [email protected] on 1 Apr 2010 at 5:04

having trouble getting started

What steps will reproduce the problem?
1. install graphviz and yapgvb on windows 7 with python 2.6.6
2. run clique.py using IDLE
3. thats it.

What is the expected output? What do you see instead?
I expected to see a graph of a clique. Instead I see the following error 
message:
********************************************************************************
Function:  render at C:\Python26\lib\site-packages\yapgvb\_yapgvb_py.py:69
Calling:   result = rendering_context.render(self, format, outstream)
           ('C:\\Python26\\lib\\site-packages\\yapgvb\\__init__.py', 333, 'render')
PathException: I'm having trouble calling Graphviz executables.  Please make 
sure Graphviz is in your PATH environment variable.
    Args:
        <yapgvb._yapgvb_py.RenderingContext object at 0x024E64B0> (<class 'yapgvb._yapgvb_py.RenderingContext'>)
        <Graph "10-clique">            (<class 'yapgvb.Graph'>)
        'png'                          (<type 'str'>)
        '10-clique.png'                (<type 'str'>)
    No keywords.
Traceback (most recent call last):
  File "C:\Users\BenBush\Downloads\clique.py", line 57, in <module>
    clique.render(filename)
  File "C:\Python26\lib\site-packages\yapgvb\__init__.py", line 333, in render
    result = rendering_context.render(self, format, outstream)
  File "C:\Python26\lib\site-packages\yapgvb\_yapgvb_py.py", line 59, in fc
    raise NotImplementedError("You are using the pure-Python experimental backend.  A lot of things are not implemented yet.")
NotImplementedError: You are using the pure-Python experimental backend.  A lot 
of things are not implemented yet.

What version of the product are you using? On what operating system?
I just installed yapgvb-1.2.0.win32.exe on windows 7 with python 2.6.6

Please provide any additional information below.
I emailed you about this problem before seeing this "issues" section and 
posting this here. Thank you for your time and advice!
--Ben

Original issue reported on code.google.com by [email protected] on 23 Sep 2010 at 4:01

Bug in page attribute conversion.

What steps will reproduce the problem?
1. Try to set paging for a graph with something like g.page = [100,100].

What is the expected output? What do you see instead?
You get an error complaining that [100,100] can't be coerced into a float.
There is a trivial bug in page's python_to_gv code.

What version of the product are you using? On what operating system?
1.2.0

Please provide any additional information below.
Here's the fix (also attached):

Index: graph_attribute_types.py
===================================================================
--- graph_attribute_types.py    (revision 15)
+++ graph_attribute_types.py    (working copy)
@@ -181,7 +181,7 @@

 pointf = AttributeType ( # FIXME - implement correctly (constraint to dim
values)
     lambda s: [float, s.split(',')],
-    lambda x: ','.join([str(float(x)) for y in x]) ,
+    lambda x: ','.join([str(float(y)) for y in x]) ,
     'point2d',
     'pointf',
 )


Original issue reported on code.google.com by [email protected] on 26 Mar 2009 at 10:46

Attachments:

read() throws exception

I can't seem to get yapgvb.Graph.read() to work.  I pass read() a temporary 
file and it throws an exception about __init__ taking 3 arguments but 
passed 2.  I fixed this so that I get a graph object back but if I call 
layout and then render the png file that is outputted is blank.  I'm not 
sure I see in the code where the file is actually read.

Original issue reported on code.google.com by [email protected] on 16 Feb 2009 at 4:07

Iterating over node's edges not possible

The following script raises a NotImplementedError:

import yapgvb

g = yapgvb.Graph()
n = g.add_node()

for edge in n.edges:
  print edge

1. would it possible to mark that attribute (n.edges) as not-yet-functional
in the documentation? 
2. is there an alternative way to iterate over all edges of a given node?

Btw. beside that it works perfectly fine on OS X. :) 

Cheers,
Reto


********************************************************************************
Function:  first_edge at
/Library/Python/2.5/site-packages/yapgvb-1.2.0-py2.5.egg/yapgvb/_yapgvb_py.py:29
6
Calling:   x = first(obj)

('/Library/Python/2.5/site-packages/yapgvb-1.2.0-py2.5.egg/yapgvb/__init__.py',
45, '_it')
NotImplementedError: 
    Args:
        <Node "rvndbkqkpbxoxlromhfgmqzqenadfmda"> (<class
'yapgvb._yapgvb_py.Node'>)
    No keywords.
Traceback (most recent call last):
  File "yapgvb-bug.py", line 7, in <module>
    for edge in n.edges:
  File
"/Library/Python/2.5/site-packages/yapgvb-1.2.0-py2.5.egg/yapgvb/__init__.py",
line 45, in _it
    x = first(obj)
  File
"/Library/Python/2.5/site-packages/yapgvb-1.2.0-py2.5.egg/yapgvb/_yapgvb_py.py",
line 59, in fc
    raise NotImplementedError("You are using the pure-Python experimental
backend.  A lot of things are not implemented yet.")
NotImplementedError: You are using the pure-Python experimental backend.  A
lot of things are not implemented yet.

Original issue reported on code.google.com by [email protected] on 14 Apr 2009 at 7:08

Error reading graph from dot file

What steps will reproduce the problem?
1. Load simple.dot with yapgvb.Graph.read()

simple.dot: 
 digraph graphname {
     a -> b -> c;
     b -> d;
 }

What is the expected output? What do you see instead?

No error expected. Instead, this python error stack: 
>>> yapgvb.Graph.read('simple.dot')
********************************************************************************
Function:  __init__ at 
/Library/Python/2.6/site-packages/yapgvb/_yapgvb_py.py:106
Calling:   CGraph.__original_init__(self, *a,**b)
           ('/Library/Python/2.6/site-packages/yapgvb/__init__.py', 181, 'cgraph_init_wrapper')
TypeError: __init__() takes exactly 3 arguments (2 given)
    Args:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 245, in read
    newgraph = cls(input_stream_or_filename)
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 531, in __init__
    GraphBase.__init__(self, arg)
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 275, in __init__
    CGraph.__init__(self,*args,**keywords)
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 181, in cgraph_init_wrapper
    CGraph.__original_init__(self, *a,**b) 
  File "/Library/Python/2.6/site-packages/yapgvb/_yapgvb_py.py", line 52, in fc
    print >> sys.stderr, "        %-30s (%s)" % (repr(x),x.__class__)
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 354, in __repr__
    return '<%s "%s">' % (self.__class__.__name__, self)
  File "/Library/Python/2.6/site-packages/yapgvb/__init__.py", line 351, in __str__
    return self.name
  File "/Library/Python/2.6/site-packages/yapgvb/_yapgvb_py.py", line 102, in <lambda>
    name = property(lambda x: x._name, readonly)
AttributeError: 'Graph' object has no attribute '_name'

What version of the product are you using? On what operating system?

1.1.3

Please provide any additional information below.

Running on Mac OSX 10.6
>>> sys.version
'2.6.1 (r261:67515, Jun 24 2010, 21:47:49) \n[GCC 4.2.1 (Apple Inc. build 
5646)]'


Original issue reported on code.google.com by [email protected] on 23 Nov 2010 at 7:39

Subgraph ?

Graphivz can hangle cluster/subgraph ...

Does yapgvb support it ? or will support it ?

Original issue reported on code.google.com by [email protected] on 23 Nov 2009 at 1:55

yapgvb module appears to be lacking classes

I am running yapgvb version 1.1.1-0ubuntu8 as installed through gui 
synaptic on eeebuntu, have also tried apt-get type install.  

1. I am trying to run some of the examples, including random_graph.py and 
clique.py.

2. yapgvb imports, but claims the module has no Graph or Digraph classes

Example:

>>> import yapgvb
>>> graph = yapgvb.Digraph("my_graph")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Digraph'


I get the feeling I'm missing something fairly obvious so apologies in 
advance!  Thanks.


Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 2:40

Problem writing graph in mac

What steps will reproduce the problem?
1. Create digraph: g = yapgvb.Digraph(fileName)
2. Construct the graph, add nodes and edges (g.add_node(...), ...)
3. Write graph: g.write(fileName)

What is the expected output? : A dot file with the graph

What do you see instead? No dot file and the following message:

********************************************************************************
Function:  write at /Library/Python/2.5/site-packages/yapgvb/_yapgvb_py.py:137
Calling:   CGraph.write(self, output_stream_or_filename)
           ('/Library/Python/2.5/site-packages/yapgvb/__init__.py', 233, 'write')
NotImplementedError: 
    Args:
        <Digraph "/Users/camilo/temp/graph.dot"> (<class 'yapgvb.Digraph'>)
        <open file '/Users/camilo/temp/graph.dot', mode 'w' at 0x104d380> (<type 'file'>)
    No keywords.
Traceback (most recent call last):
  File "/Users/camilo/Tools/ODS/ods2graph.py", line 289, in <module>
    gModel.WriteGraph()
  File "/Users/camilo/Tools/ODS/Model.py", line 608, in WriteGraph
    g.write(self.fileName)            
  File "/Library/Python/2.5/site-packages/yapgvb/__init__.py", line 233, in write
    CGraph.write(self, output_stream_or_filename)
  File "/Library/Python/2.5/site-packages/yapgvb/_yapgvb_py.py", line 59, in fc
    raise NotImplementedError("You are using the pure-Python experimental backend.  A lot of 
things are not implemented yet.")
NotImplementedError: You are using the pure-Python experimental backend.  A lot 
of things are 
not implemented yet.


What version of the product are you using? On what operating system?
yapgvb 1.2.0 
Mac OS X 10.5.8

Please provide any additional information below.

installed from yapgvb-1.2.0-source.tar (link in yapgvb page for Macintosh 
version)

Original issue reported on code.google.com by [email protected] on 26 Nov 2009 at 1:27

Recursive error handling blows stack if you try to display a Graph at the REPL

What steps will reproduce the problem?
1. Open a Python prompt
2. Call yapgvb.Digraph("G")

What is the expected output? What do you see instead?
I'd expect to see some textual representation of a graph. Instead I see a
vast strack trace that repeats until the stack is blown.

What version of the product are you using? On what operating system?
1.2.0

Please provide any additional information below.
The problem is caused by the error handling code in _yapgvb_py.debug()
trying to print a representation of the arguments. Since doing that is what
causes the problem in the first place it recurses.

Original issue reported on code.google.com by [email protected] on 26 Mar 2009 at 10:42

Edge iterator not implemented?

I can understand some existing problems, such as lack of built-in search 
functions, but is the edge iterator really not implemented in new version 
(the one with the python back-end)? This is crucial!

P.S. Thanks for the great and easy-to-use binding!

Original issue reported on code.google.com by [email protected] on 10 May 2010 at 10:00

width of edge configrable

What is the expected output? 
edge=g.add_edge(curr_node, next_node)
edge.width=<width>

What version of the product are you using? On what operating system?
1.2.3 Linux


Original issue reported on code.google.com by [email protected] on 10 May 2009 at 7:12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.