#13624: KeyError raised by GraphLatex.dot2tex_picture when edge_labels=True
-------------------------------------+--------------------------------------
Reporter: slabbe | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-5.5
Component: optional packages | Resolution:
Keywords: dot2tex | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Comment (by slabbe):
I managed to fix the bug with the following hack :
{{{
#!diff
diff --git a/src/dot2tex/dot2tex.py b/src/dot2tex/dot2tex.py
--- a/src/dot2tex/dot2tex.py
+++ b/src/dot2tex/dot2tex.py
@@ -1153,6 +1153,20 @@ To see what happened, run dot2tex with t
for name,item in usededges.items():
edge = item
+ ########### hacking starts here
+ # adding a break here fixes the bug
+ # for when edge_labels is true
+ print "we are breaking the loop "
+ print "for name,item in usededges.items():"
+ print "because it is broken"
+ break
+ ###### some print that might be usefull:
+ print "name = ", name
+ print "item = ", item
+ print "pp.texdims.keys() = ",pp.texdims.keys()
+ print "len(pp.texdims) = ",len(pp.texdims)
+ print "pp.texdims[pp.texdims.keys()[0]] =
",pp.texdims[pp.texdims.keys()[0]]
+ print "dir(pp) = ",dir(pp)
+ ######### hacking is ending here
hp,dp,wt = pp.texdims[name]
xmargin, ymargin = self.get_margins(edge)
labelcode = '<<<table border="0" cellborder="0"
cellpadding="0">'\
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13624#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.