[SOLVED] I can't fix my script

I am on computer science path. Currently I am on the project - Choose Your Own Adventure: Wilderness Escape.
I am stuck on step 31 my script doesn’t work like it is supposed to.
Script-


######
# TREENODE CLASS
######

print("Once upon a time...")

class TreeNode:
  def __init__(self, story_piece):
    self.story_piece = story_piece
    self.choices = []
  def add_child(self, node):
    self.choices.append(node)
  def traverse(self):
    story_node = self
    print(story_node.story_piece)
    while len(story_node.choices) > 0:
      choice = input("""Enter 1 or 2 to continue the story: """)
      if choice not in ["1","2"]:  
        print("Invalid Choice!")
      else:
        chosen_index = int(choice)
        chosen_index -= 1
        chosen_child = story_node.choices[chosen_index]
        print(chosen_child.story_piece)
        story_node = chosen_child
  

######
# VARIABLES FOR TREE
######

story_root = TreeNode("""
You are in a forest clearing. There is a path to the left.
A bear emerges from the trees and roars!
Do you: 
1 ) Roar back!
2 ) Run to the left...
""")

choice_a = TreeNode("""
The bear is startled and runs away.
Do you:
1 ) Shout 'Sorry bear!'
2 ) Yell 'Hooray!'
""")

choice_b = TreeNode("""
You come across a clearing full of flowers. 
The bear follows you and asks 'what gives?'
Do you:
1 ) Gasp 'A talking bear!'
2 ) Explain that the bear scared you.
""")

story_root.add_child(choice_a)
story_root.add_child(choice_b)


######
# TESTING AREA
######
story_root.traverse

It is supposed to traverse through story but it only prints out -

“Once upon a time…” like in the first line.

I have cross checked with the youtube instruction video it still wouldnt work.

Thanks in advance

could you provide the url of the exercise/project? Then i can also check the instruction/video

the most obvious flaw seems to be here:

story_root.traverse

traverse is a method, calling a method requires parentheses.

1 Like

Sure
Project

Instruction video

oh my god I made such a small mistake, you were right i forgot to call the parenthesis Thanks!!