lldb example does not work


I am trying the above example, but shows the following error. Does
anybody know what is wrong with it? Thanks.

(lldb) process attach -n "dictionary"
1 location added to breakpoint 1
Process 25686 stopped
(lldb) breakpoint set -n find_word
Breakpoint 2: where = dictionary`find_word + 16 at dictionary.c:126,
address = 0x000000010d9a9a90
(lldb) continue
Process 25686 resuming
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.

import tree_utils
root = lldb.frame.FindVariable ("dictionary")
current_path = ""
path = tree_utils.DFS (root, "Romeo", current_path)

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "./tree_utils.py", line 47, in DFS
    end = len (root_word) - 1
TypeError: object of type 'NoneType' has no len()

<adding lldb-dev>