{"record":{"id":"d76fe8b9d62916e3","repo":"AtsushiSakai/PythonRobotics","slug":"node-is-not-implemented","errorCode":null,"errorMessage":"Node is not implemented","messagePattern":"Node is not implemented","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"MissionPlanning/BehaviorTree/behavior_tree.py","lineNumber":44,"sourceCode":"\n\nclass Node:\n    \"\"\"\n    Base class for all nodes in a behavior tree.\n    \"\"\"\n\n    def __init__(self, name):\n        self.name = name\n        self.status = None\n\n    def tick(self) -> Status:\n        \"\"\"\n        Tick the node.\n\n        Returns:\n            Status: The status of the node.\n        \"\"\"\n        raise ValueError(\"Node is not implemented\")\n\n    def tick_and_set_status(self) -> Status:\n        \"\"\"\n        Tick the node and set the status.\n\n        Returns:\n            Status: The status of the node.\n        \"\"\"\n        self.status = self.tick()\n        return self.status\n\n    def reset(self):\n        \"\"\"\n        Reset the node.\n        \"\"\"\n        self.status = None\n\n    def reset_children(self):","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/AtsushiSakai/PythonRobotics/blob/1fe4fb980f6a12fe21c3c33d2b4da97a52c9154d/MissionPlanning/BehaviorTree/behavior_tree.py#L26-L62","documentation":"Raised by Node.tick, the base-class implementation in the behavior tree. Node is abstract; ticking it directly means no behavior was defined, so it deliberately raises to signal an unimplemented node.","triggerScenarios":"Instantiating the base Node class (or a subclass that overrides __init__ but not tick) and calling tick() or tick_and_set_status() on it.","commonSituations":"Creating custom action/decorator nodes and forgetting to implement the tick method, or accidentally instantiating Node instead of ActionNode/SequenceNode.","solutions":["Subclass a concrete node type (ActionNode, DecoratorNode, ControlNode) and implement tick().","If you subclass Node directly, override tick to return a Status.","Check that your custom node class actually defines tick before adding it to a tree."],"exampleFix":"// before\nclass MyNode(Node):\n    pass  # no tick\n\n// after\nclass MyNode(ActionNode):\n    def tick(self):\n        return Status.SUCCESS","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"import inspect\nfrom MissionPlanning.BehaviorTree.behavior_tree import Node\n\ndef is_tickable(n) -> bool:\n    return type(n).tick is not Node.tick","tryCatchPattern":"try:\n    node.tick_and_set_status()\nexcept ValueError as e:\n    if 'not implemented' in str(e):\n        raise TypeError(f'{type(n).__name__} must implement tick()')\n    raise","preventionTips":["Always subclass concrete node types (ActionNode/DecoratorNode/ControlNode).","Add abc.abstractmethod-style checks or unit tests that every custom node ticks."],"tags":["behavior-tree","abstract-method","python"],"backgroundTag":"abstract-method-not-implemented","analyzedSha":"1fe4fb980f6a12fe21c3c33d2b4da97a52c9154d","analyzedAt":"2026-08-28T13:23:33.733Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}