why do I get the following error:from: can't read /var/mail/__future__ when trying to execute the client and service tutorial? [closed]

asked 2020-10-13 06:54:57 -0500

Maoz K gravatar image

updated 2020-10-14 03:51:04 -0500

gvdhoorn gravatar image

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):'
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2020-10-14 12:26:22.101899


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.

gvdhoorn gravatar image gvdhoorn  ( 2020-10-13 12:19:33 -0500 )edit

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.

Maoz K gravatar image Maoz K  ( 2020-10-14 02:40:29 -0500 )edit

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).

gvdhoorn gravatar image gvdhoorn  ( 2020-10-14 03:50:50 -0500 )edit

OK I'll try it, thank you :)

Maoz K gravatar image Maoz K  ( 2020-10-14 08:03:11 -0500 )edit

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 :)

Maoz K gravatar image Maoz K  ( 2020-10-14 09:10:06 -0500 )edit

@Maoz K check out this answer for an explanation of why you need the #!: https://answers.ros.org/question/3060...

jarvisschultz gravatar image jarvisschultz  ( 2020-10-14 12:15:26 -0500 )edit