Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecursionError in TreeNode.from_newick() #397

Open
padix-key opened this issue May 30, 2022 · 0 comments
Open

RecursionError in TreeNode.from_newick() #397

padix-key opened this issue May 30, 2022 · 0 comments
Labels

Comments

@padix-key
Copy link
Member

When a Tree is created from a large number of sequences, the following error occurs:

src/biotite/sequence/phylo/tree.pyx:323: in biotite.sequence.phylo.tree.Tree.from_newick
    root, distance = TreeNode.from_newick(newick, labels)
src/biotite/sequence/phylo/tree.pyx:921: in biotite.sequence.phylo.tree.TreeNode.from_newick
    child, dist = TreeNode.from_newick(
src/biotite/sequence/phylo/tree.pyx:921: in biotite.sequence.phylo.tree.TreeNode.from_newick
    child, dist = TreeNode.from_newick(
RecursionError: maximum recursion depth exceeded while calling a Python object

The reason is that from_newick() uses recursion to create the tree, which is limited to a certain depth in Python.

@padix-key padix-key added the bug label Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant