DTM05 / yapgvb

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

Bug in page attribute conversion. #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 ben.butl...@gmail.com on 26 Mar 2009 at 10:46

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks. Fixed in subversion, version 1.2.2 

Original comment by lonnie.p...@gmail.com on 13 Apr 2009 at 2:38