# \[Bug\] Gradebot mistake!

**URL:** <https://get-help.theconstruct.ai/t/bug-gradebot-mistake/31492>\
**Category:** ROS2 Basics in 5 Days Humble (Python)\
**Created:** [July 29, 2024, 3:42pm UTC](https://get-help.theconstruct.ai/t/bug-gradebot-mistake/31492 "2024-07-29T15:42:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbrose](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/c/76d3ee/32.png) [@cbrose](https://get-help.theconstruct.ai/u/cbrose)\
**Post date:** [July 29, 2024, 3:42pm UTC](https://get-help.theconstruct.ai/t/bug-gradebot-mistake/31492/1 "2024-07-29T15:42:09Z")

</div>

This is an error report.

* * *

**Screenshot of the error**

 ![](https://get-help.theconstruct.ai/uploads/default/original/2X/7/7eec338473573f1a7f9acd06d4e2902a1f89870b.jpeg)
* * *

**Error details**

Gradebot show an error of non subscription for /odom topic but it's done in the code. When I did the second trial, Gradebot say that it was good and give me 8/10 notation. The simulation works very well.

---

<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:** [July 30, 2024, 11:23am UTC](https://get-help.theconstruct.ai/t/bug-gradebot-mistake/31492/3 "2024-07-30T11:23:35Z")

</div>

This was not a gradebot mistake. It could be an error in our code or yours, but the gradebot is kinda perfect 😉

That said, the first error here is that you should have contacted us after the 3rd trial max; now you have used up all 5 trials! 🫤 I have assigned you two more trials; please use them judiciously.

The problem was that you introduced one or more errors in your code after the 2nd trial. You should re-test your code after every change to ensure it still works.

You should ensure you can launch this code for at least 30 seconds: it’s crashing with the following error:

```auto
ros2 launch topics_quiz topics_quiz.launch.py

```

**Error:**

```auto
[topics_quiz-1] Traceback (most recent call last):
[topics_quiz-1] File "/home/user/ros2_ws/install/topics_quiz/lib/topics_quiz/topics_quiz", line 33, in <module>
[topics_quiz-1] sys.exit(load_entry_point('topics-quiz==0.0.0', 'console_scripts', 'topics_quiz')())
[topics_quiz-1] File "/home/user/ros2_ws/install/topics_quiz/lib/python3.10/site-packages/topics_quiz/topics_quiz.py", line 145, in main
[topics_quiz-1] rclpy.spin(topics_quiz_node)
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/ __init__.py", line 222, in spin
[topics_quiz-1] executor.spin_once()
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 712, in spin_once
[topics_quiz-1] raise handler.exception()
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
[topics_quiz-1] self._handler.send(None)
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 418, in handler
[topics_quiz-1] await call_coroutine(entity, arg)
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 332, in _execute_timer
[topics_quiz-1] await await_or_execute(tmr.callback)
[topics_quiz-1] File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute
[topics_quiz-1] return callback(*args)
[topics_quiz-1] File "/home/user/ros2_ws/install/topics_quiz/lib/python3.10/site-packages/topics_quiz/topics_quiz.py", line 115, in motion
[topics_quiz-1] if self.laser_left < 5:
[topics_quiz-1] AttributeError: 'Topics_quiz' object has no attribute 'laser_left'

```

---

<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:** [August 4, 2024, 11:24am UTC](https://get-help.theconstruct.ai/t/bug-gradebot-mistake/31492/4 "2024-08-04T11:24:06Z")

</div>

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