Open ll7 opened 5 months ago
The error message 'NoneType' object has no attribute 'robot_action' suggests that state.action is None at the time when state.action.robot_action is being accessed.
To fix this issue, you should add a check to ensure that state.action is not None before trying to access its robot_action attribute. Here's a proposed fix:
# Before
f'RobotAction: {state.action.robot_action}',
# After
f'RobotAction: {state.action.robot_action if state.action is not None else "None"}',
This change will print "None" for the RobotAction if state.action is None, preventing the AttributeError.
If state.action should not be None at this point in your code, you may have a bug elsewhere that is causing state.action to be None. In that case, you should debug your code to find out why state.action is None.