why do I get the following error:from: can't read /var/mail/__future__ when trying to execute the client and service tutorial?
Straight dump of the error:
aoz@maoz-VirtualBox:~/catkin_ws$ rosrun beginner_tutorials add_two_ints_client.py 1 3
from: can't read /var/mail/__future__
import-im6.q16: not authorized `sys' @ error/constitute.c/WriteImage/1037.
import-im6.q16: not authorized `rospy' @ error/constitute.c/WriteImage/1037.
from: can't read /var/mail/beginner_tutorials.srv
/home/maoz/catkin_ws/src/beginner_tutorials/scripts/add_two_ints_client.py: line 7: syntax error near unexpected token `('
/home/maoz/catkin_ws/src/beginner_tutorials/scripts/add_two_ints_client.py: line 7: `def add_two_ints_client(x, y):'
Asked by Maoz K on 2020-10-13 06:54:57 UTC
Comments
I believe this is a duplicate of #q149916 (and a few other Q&As). Please see whether that question solves your problem.
If it does, please close yours.
Asked by gvdhoorn on 2020-10-13 12:19:33 UTC
Hi thanks, but actually it's not the same, because it happens when I run the client, not the server, meaning this line: rosrun beginner_tutorials add_two_ints_client.py 1 3. anyway the error path is also different.
Asked by Maoz K on 2020-10-14 02:40:29 UTC
Your missing the same thing from your script, namely, the shebang. The path doesn't matter, nor the fact that it's your client (not the server).
Asked by gvdhoorn on 2020-10-14 03:50:50 UTC
OK I'll try it, thank you :)
Asked by Maoz K on 2020-10-14 08:03:11 UTC
Thanks, it did work :) ,though I don't understand what it does to fix it, if you are willing I would be happy for you to explain this so I will know to use the same method when it happens again :)
Asked by Maoz K on 2020-10-14 09:10:06 UTC
@Maoz K check out this answer for an explanation of why you need the
#!
: https://answers.ros.org/question/306065/error-on-import-ros-packages/?answer=306278#post-id-306278Asked by jarvisschultz on 2020-10-14 12:15:26 UTC