Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "ValueError: list.remove(x): x not in list" in testing on rolling #45

Open
felixdivo opened this issue Jun 18, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@felixdivo
Copy link
Owner

felixdivo commented Jun 18, 2024

See this log:

____________________ TestSingleNode.test_calling_an_action _____________________
ros2_easy_test/ros2_easy_test/decorators.py:128: in wrapper
    executor.spin_until_future_complete(
/opt/ros/rolling/lib/python3.12/site-packages/rclpy/executors.py:328: in spin_until_future_complete
    self.spin_once_until_future_complete(future, timeout_left)
/opt/ros/rolling/lib/python3.12/site-packages/rclpy/executors.py:907: in spin_once_until_future_complete
    self._spin_once_impl(timeout_sec, future.done)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <rclpy.executors.MultiThreadedExecutor object at 0x7fb80c2f32f0>
timeout_sec = <rclpy.executors.TimeoutObject object at 0x7fb80c41cb90>
wait_condition = <bound method Future.done of <rclpy.task.Task object at 0x7fb80c2f30b0>>

    def _spin_once_impl(
        self,
        timeout_sec: Optional[Union[float, TimeoutObject]] = None,
        wait_condition: Callable[[], bool] = lambda: False
    ) -> None:
        try:
            handler, entity, node = self.wait_for_ready_callbacks(
                timeout_sec, None, wait_condition)
        except ExternalShutdownException:
            pass
        except ShutdownException:
            pass
        except TimeoutException:
            pass
        except ConditionReachedException:
            pass
        else:
            self._executor.submit(handler)
            self._futures.append(handler)
            # make a copy of the list that we iterate over while modifying it
            # (https://stackoverflow.com/q/1207406/3753684)
            for future in self._futures[:]:
                if future.done():
>                   self._futures.remove(future)
E                   ValueError: list.remove(x): x not in list

/opt/ros/rolling/lib/python3.12/site-packages/rclpy/executors.py:895: ValueError
----------------------------- Captured stderr call -----------------------------
[INFO] [1718747826.149957309] [minimal_action_server]: Accepting goal request
[INFO] [1718747826.156829616] [minimal_action_server]: Executing goal...
[INFO] [1718747826.257690692] [minimal_action_server]: Publishing feedback: array('i', [0, 1, 1])
[INFO] [1718747826.268627448] [minimal_action_server]: Publishing feedback: array('i', [0, 1, 1, 2])
[INFO] [1718747826.279537183] [minimal_action_server]: Publishing feedback: array('i', [0, 1, 1, 2, 3])
[INFO] [1718747826.292523641] [minimal_action_server]: Returning result: array('i', [0, 1, 1, 2, 3])
[INFO] [1718747826.298843446] [minimal_action_server]: Accepting goal request

It appears to happen around here.

@felixdivo felixdivo added bug Something isn't working help wanted Extra attention is needed labels Jun 18, 2024
@felixdivo
Copy link
Owner Author

Is this connected to ros2/rclpy#1129?

@felixdivo
Copy link
Owner Author

@felixdivo
Copy link
Owner Author

To be discussed in ros2/rclpy#1393

@felixdivo felixdivo self-assigned this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant