Closed DavidESDR closed 2 weeks ago
Code
object.dump_typetree();
Error
File "..\UnityPy\files\ObjectReader.py", line 193, in dump_typetree nodes = self.get_typetree(nodes) TypeError: 'NoneType' object is not callable
Fix It seems to just be a typo. I changed get_typetree to get_typetree_nodes and it worked perfectly after testing.
get_typetree
get_typetree_nodes
def dump_typetree(self, nodes: list = None) -> str: self.reset() sb = [] # Error here: "get_typetree is non-callable" nodes = self.get_typetree(nodes) # Should be: # nodes = self.get_typetree_nodes(nodes) TypeTreeHelper.read_typetree_str(sb, nodes, self) return "".join(sb)
Version UnityPy 1.10.17 Python 3.12.5
Thanks for reporting the issue. You're right, looks like I forgot to update the function when I reworked this ages ago.
Code
Error
Fix It seems to just be a typo. I changed
get_typetree
toget_typetree_nodes
and it worked perfectly after testing.Version UnityPy 1.10.17 Python 3.12.5