Closed AudenCote closed 2 years ago
The problem was indeed in the code, due to a bad import inside the method. It was a leftover from py2. I found a few more instances of the same problem in other files. Fixed now, I think; at least it works for Tree.dupeSubTree(). Thanks for pointing it out.
I am trying to use the tree.dupeSubTree() function and getting the following error:
File "", line 187, in get_subtree
clade_tree = tree.dupeSubTree(node, up = True)
File "software/p4-phylogenetics/1.4-20210322-foss-2019b-Python-3.7.4/lib/python3.7/site-packages/p4/tree_manip.py", line 1769, in dupeSubTree
from tree import Tree
ModuleNotFoundError: No module named 'tree'
It looks like this error is in the dupSubTree() function and not in my code, as it tries to import the Tree class. I see that there is a tree.py file where this is defined, and this file is in the downloaded folder. Perhaps it is not being compiled correctly on the install? I have used this function in the past on a different computer and just recently downloaded p4 on the computer where I got this error. Any help here would be appreciated, please let me know how I can facilitate this or if I should provide any more helpful information.