# Exercise 4.3 ROS Basics Python

**URL:** <https://get-help.theconstruct.ai/t/exercise-4-3-ros-basics-python/15271>\
**Category:** ROS Basics In 5 Days (Python)\
**Tags:** error\
**Created:** [February 6, 2022, 5:45pm UTC](https://get-help.theconstruct.ai/t/exercise-4-3-ros-basics-python/15271 "2022-02-06T17:45:51Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [February 8, 2022, 3:04pm UTC](https://get-help.theconstruct.ai/t/exercise-4-3-ros-basics-python/15271/22 "2022-02-08T15:04:15Z")

</div>

Hi @maanvisingh,

I created a package and created a message named **Age.msg** just like you did to reproduce the error you are experiencing.

I then created a file named **age\_pub.py** and put the content you shared here and it failed for the same reason.

I then tried to fiind a file named **Age.py** in my **~/catkin\_ws** (which should have been generated when we run `catkin_make`) but could not find it, which left me thinking 🤔.

I then checked the `~/catkin_ws/devel/lib/python3/dist-packages/my_examples_pkg/msg/` folder, and for my surprise, I found that the generated file was named “ **\_Age.py** ” instead of “ **Age.py** ”. I have no idea why this happened.

But to solve the issue, I just copied the **\_Age.py** file to **Age.py**

```auto
 
cp -v ~/catkin_ws/devel/lib/python3/dist-packages/my_examples_pkg/msg/_Age.py ~/catkin_ws/devel/lib/python3/dist-packages/my_examples_pkg/msg/Age.py

```

After that, running **`python age_pub.py`** worked.

Again, I don’t know why the generated file was named \_Age.py instead of Age.py, but copying it to Age.py solved the problem in my tests.

---

_[View the full topic](https://get-help.theconstruct.ai/t/exercise-4-3-ros-basics-python/15271)._
