That error message means that $Animation is null, i.e. it's not a valid node reference. The scene tree on the left doesn't show the Player or Animation nodes, so it's not clear why that's happening.
If you add this before the line that's causing the error, it will output the current node's children:
print_tree()