# Cannot see error in simple\_publisher code

**URL:** <https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998>\
**Category:** ROS2 Basics in 5 Days Humble (Python)\
**Created:** [June 21, 2024, 3:57pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998 "2024-06-21T15:57:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ROxX](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/dfb087/32.png) [@ROxX](https://get-help.theconstruct.ai/u/ROxX)\
**Post date:** [June 21, 2024, 3:57pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998/1 "2024-06-21T15:57:00Z")

</div>

I have compared the file line by line to the example and I cannot see my error . How do I read this message.

 ![image](https://get-help.theconstruct.ai/uploads/default/original/2X/8/82c45bbbb5e677af251ff01f05c9417fdbc26206.png)

---

<div class="post-metadata">

**Author:** ![ROxX](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/dfb087/32.png) [@ROxX](https://get-help.theconstruct.ai/u/ROxX)\
**Post date:** [June 21, 2024, 3:58pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998/2 "2024-06-21T15:58:09Z")

</div>

![image](https://get-help.theconstruct.ai/uploads/default/original/2X/9/95536bbcb84671ee99189c43b38d6f10e234508a.png)

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [June 21, 2024, 4:08pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998/3 "2024-06-21T16:08:39Z")

</div>

Hi @ROxX ,

Your program seems to be fine. The error that you posted in your image seems to show a typo in your function name.  
The error states that `SimpleSubscriber` has no attribute `listner_callback`.  
But your code in the second post seems to have fixed the typo error by actually having the function name as `listener_callback`.

I believe the install packages have not updated since your past build.

You need to build from scratch to fix this issue.

```bash
cd ~/ros2_ws
rm -rf ./build ./install ./log
colcon build
source install/setup.bash

```

Then run your program executable:

```bash
ros2 run subscriber_pkg simple_subscriber

```

This should fix your problem. Let me know if this did not work.

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![ROxX](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/dfb087/32.png) [@ROxX](https://get-help.theconstruct.ai/u/ROxX)\
**Post date:** [June 21, 2024, 7:28pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998/4 "2024-06-21T19:28:32Z")

</div>

> [@girishkumar.kannan](#):
>
> `ros2 run subscriber_pkg simple_subscriber`

thank you, I have to log off and then back on often. so I am confused about what is required at the beginning of each log on session could you define what is required?

then I have not been able to copy / paste to the IDE so I type in everything creating the typo. This is not critical, but would make it easier if I knew how to result.

The Construct is a very good teaching program. Thank you

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [June 26, 2024, 7:29pm UTC](https://get-help.theconstruct.ai/t/cannot-see-error-in-simple-publisher-code/30998/5 "2024-06-26T19:29:18Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
