# Why am I getting this error?

**URL:** <https://get-help.theconstruct.ai/t/why-am-i-getting-this-error/5880>\
**Category:** ROS Basics In 5 Days (Python)\
**Created:** [October 27, 2020, 7:43pm UTC](https://get-help.theconstruct.ai/t/why-am-i-getting-this-error/5880 "2020-10-27T19:43:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdulbasitisdost](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/abdulbasitisdost/32/9348_2.png) [@abdulbasitisdost](https://get-help.theconstruct.ai/u/abdulbasitisdost)\
**Post date:** [October 27, 2020, 7:43pm UTC](https://get-help.theconstruct.ai/t/why-am-i-getting-this-error/5880/1 "2020-10-27T19:43:56Z")

</div>

Respected Professor,  
I wonder why am I getting the following error when I execute the **roslaunch unit\_4\_services my\_robot\_arm\_demo.launch** code.

 ![Screenshot (774)](https://get-help.robotigniteacademy.com/uploads/default/original/2X/9/97ec28006aacc97b28b679bd765e26bd3de49beb.png)

I’ve written the following code in **.launch** file

```
    <include file="$(find iri_wam_reproduce_trajectory)/launch/start_service.launch"/>
    <node pkg="unit_4_services"
        type="exercise_4_1.py"
        name="service_execute_trajectory_client"
        output="screen">
    </node>

</launch>

```

And written the following code in **.py** file  
#! /usr/bin/env python

```
import rospkg
import rospy
from iri_wam_reproduce_trajectory.srv import ExecTraj, ExecTrajRequest

rospy.init_node('service_execute_trajectory_client')
rospy.wait_for_service('/execute_trajectory')
execute_trajectory_service_client = rospy.ServiceProxy('/execute_trajectory', ExecTraj)
execute_trajectory_request_object = ExecTrajRequest()

rospack = rospkg.RosPack()
trajectory_file_path = rospack.get_path('iri_wam_reproduce_trajectory') + "/config/get_food.txt"

execute_trajectory_request_object.file = trajectory_file_path
result = execute_trajectory_service_client(execute_trajectory_request_object)
print result

```

The code seems to be correct because I’ve corrected it from the solution of exercise 4.1…But, it’s still throwing error

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [October 28, 2020, 10:10am UTC](https://get-help.theconstruct.ai/t/why-am-i-getting-this-error/5880/2 "2020-10-28T10:10:28Z")

</div>

Hi @abdulbasitisdost,

Please review this post for a solution to the problem:

> **[ERROR: cannot launch node of type \[package/file.py\]: can't locate node...](https://get-help.theconstruct.ai/t/error-cannot-launch-node-of-type-package-file-py-cant-locate-node-file-py-in-package-package/54)**
>
> This error is very common when using ROS to launch a python node, either via rosrun or roslaunch. SOLUTION: Does the file file.py… exist in the package package? If not, create it! (Does the package itself exist and is it spelled correctly?)....
