我一直在写这段代码,到现在为止我已经试着调试了将近一天,但是我看不出问题出在哪里。在
我在66行停止调试器。
当我进入或越过代码时,我会收到一条错误消息。在Traceback (most recent call last):
File "/home/johan/pycharm-community-4.5.3/helpers/pydev/pydevd.py", line 2358, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/johan/pycharm-community-4.5.3/helpers/pydev/pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/johan/sdp/lets_learn_python/20_a_star_algorithm.py", line 87, in
a.solve()
File "/home/johan/sdp/lets_learn_python/20_a_star_algorithm.py", line 66, in solve
closest_child.create_children()
File "/home/johan/sdp/lets_learn_python/20_a_star_algorithm.py", line 48, in create_children
child = StateString(val, self)
File "/home/johan/sdp/lets_learn_python/20_a_star_algorithm.py", line 32, in __init__
self.dist = self.get_dist()