[Biopython-dev] [Biopython - Bug #3405] (New) to_networkx converts weights as string

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri Feb 1 16:04:20 UTC 2013


Issue #3405 has been reported by Aleksey Kladov.

----------------------------------------
Bug #3405: to_networkx converts weights as string
https://redmine.open-bio.org/issues/3405

Author: Aleksey Kladov
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 
URL: 


in the file /Bio/Phylo/_utils.py in the method add_edge(graph, n1, n2) there is a line

<pre> graph.add_edge(n1, n2, weight=str(n2.branch_length or 1.0)) </pre>


It's strange, because if weights are strings, then you are unable to find shortest paths due to

<pre>TypeError: unsupported operand type(s) for +: 'int' and 'str'</pre>


----------------------------------------
You have received this notification because this email was added to the New Issue Alert plugin


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org




More information about the Biopython-dev mailing list