den-run-ai / yapgvb

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

Error rendering with Python 2.6 on Mac OSX #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 neil.er...@gmail.com on 10 Jun 2009 at 5:11

GoogleCodeExporter commented 9 years ago
I think you're making a mistake. You have to call render like this:

graph.layout(yapgv.engines.dot)
and then
graph.render("whatever.png")

Original comment by ISC...@gmail.com on 15 Sep 2009 at 2:34

GoogleCodeExporter commented 9 years ago
I had this problem, too.  And then I installed graphviz on my Mac.  Now it 
works.

Original comment by vic.nor...@gmail.com on 5 Feb 2010 at 9:24