You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some test code in Python using unittest and rosnode.ping_node().
When running this test code with Python 3 (ROS Noetic), a series of warnings are displayed, stating that sockets are not explicitly closed. I have not seen these warnings before with ROS Melodic and Python 2.7, so I am guessing this has been added in Python 3.x.
For an example, consider the following environment:
Hi @git-afsantos Did you end up solving this in some way?
I'm facing the same issue now (this is actually causing a memory leak in my node) so if you have any findings that you could share that would be great.
Edit: I have a fix, I will make a PR today or tomorrow and update this issue accordingly.
Greetings!
I have some test code in Python using
unittest
androsnode.ping_node()
.When running this test code with Python 3 (ROS Noetic), a series of warnings are displayed, stating that sockets are not explicitly closed. I have not seen these warnings before with ROS Melodic and Python 2.7, so I am guessing this has been added in Python 3.x.
For an example, consider the following environment:
And the following test code:
Executing this code with Python 3 produces the following output.
Test Output
Here is an abbreviated version of the issue:
The issue can be resolved by enveloping
ServerProxy
instances used inping_node
(example 1, example 2) with a context manager, as stated in the docs and as shown in similar reports in StackOverflow.The text was updated successfully, but these errors were encountered: