# Services Quiz. Gradebot Fails to compile the package. How fix it?

**URL:** <https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515>\
**Category:** ROS2 Basics in 5 Days Humble (Python)\
**Tags:** howto, quiz\
**Created:** [January 9, 2023, 3:53pm UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515 "2023-01-09T15:53:30Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 9, 2023, 3:53pm UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/1 "2023-01-09T15:53:30Z")

</div>

Gradebot says:  
Feedback from the last successful autocorrection:

✔ [info] Setting up ROS2 environment (mark: 0)

✔ [info] ROS2 environment setup is okay (mark: 0)

✔ [assess] `services_quiz` package found (mark: .5)

✔ [assess] `services_quiz_srv` package found (mark: 1.0)

✔ [info] compiling packages `services_quiz` and `services_quiz_srv`… (mark: 1.0)

✖ [assess] The `services_quiz` and `services_quiz_srv` packages did not compile successfully. Let’s fix this before we continue.  
Things you can check before retrying:

- Run `colcon build --packages-select services_quiz services_quiz_srv` and ensure it compiles without an error. (mark: 1.0)

## user:~/ros2\_ws$ colcon build --packages-select services\_quiz Starting \>\>\> services\_quiz — stderr: services\_quiz /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn(

Finished \<\<\< services\_quiz [2.42s]

Summary: 1 package finished [3.27s]  
1 package had stderr output: services\_quiz  
user:~/ros2\_ws$

How fix it?

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 9, 2023, 6:41pm UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/2 "2023-01-09T18:41:30Z")

</div>

![Screenshot from 2023-01-10 01-40-43](https://get-help.robotigniteacademy.com/uploads/default/original/2X/e/e84cf5bc090e00fda094111e659d44a82b685d7f.png)

Although the packages were compiled before being submitted to GradeBot (services\_quiz\_srv no errors, services\_quiz with a warning message but no errors).

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [January 10, 2023, 9:03am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/3 "2023-01-10T09:03:07Z")

</div>

Hello @oleg.a.kuvaev ,

As indicated in the other post, I solve this by removing the current compilation files and rebuilding the workspace:

```auto
cd ~/ros2_ws
rm -rf build install log
colcon build

```

Also, I saw that you had some compilation files inside `~/ros2_ws/src` :

 ![Captura de pantalla 2023-01-10 a las 9.56.53](https://get-help.robotigniteacademy.com/uploads/default/original/2X/7/7d4d3d6e352707ee26cb212c71e7296b857549dc.png)

**You MUST only compile in the root of the workspace** `/home/user/ros2_ws` and nowhere else. So all the compilation folders/files that are outside the root of the workspace must be removed.

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 9:35am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/4 "2023-01-10T09:35:35Z")

</div>

![Screenshot from 2023-01-10 23-30-23](https://get-help.robotigniteacademy.com/uploads/default/original/2X/f/f601aa34b6e2c65e7f02a5cdc34898e3282e7e62.png)  
 ![Screenshot from 2023-01-10 23-28-30](https://get-help.robotigniteacademy.com/uploads/default/original/2X/0/08878a88ff302ec94ee839bf24e84856cbf387dc.png)  
 ![Screenshot from 2023-01-10 23-26-27](https://get-help.robotigniteacademy.com/uploads/default/original/2X/6/6a0b0d213481ecb64ae72ce01bc40ca375da11c1.png)

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 9:36am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/5 "2023-01-10T09:36:26Z")

</div>

![Screenshot from 2023-01-10 23-32-20](https://get-help.robotigniteacademy.com/uploads/default/original/2X/7/710cb386a56912f20fdbe5f83d69e78eb4007493.png)  
 ![Screenshot from 2023-01-10 23-30-38](https://get-help.robotigniteacademy.com/uploads/default/original/2X/1/1659292f999a59a27950d39997ec24dc83b5e66d.png)  
 ![Screenshot from 2023-01-10 23-26-27](https://get-help.robotigniteacademy.com/uploads/default/original/2X/6/6a0b0d213481ecb64ae72ce01bc40ca375da11c1.png)  
 ![Screenshot from 2023-01-10 23-43-01](https://get-help.robotigniteacademy.com/uploads/default/original/2X/8/8746658b8266816de8a1a3b4cadb4571783090a7.png)

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 9:40am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/6 "2023-01-10T09:40:06Z")

</div>

This did not solve the problem.  
Packages are compiled before being sent to GradeBot. Executed by a robot.  
GradeBot gives a compilation error (there are 2 attempts left, this is already bothering me a little).  
What’s wrong?

---

<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:** [January 10, 2023, 9:45am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/7 "2023-01-10T09:45:59Z")

</div>

Hi @oleg.a.kuvaev ,

`setuptools` installed in your environment is probably a wrong version.  
Try the following command on your terminal:

```auto
pip install setuptools==58.2.0

```

Source: [SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. - ROS Answers: Open Source Q&A Forum](https://answers.ros.org/question/396439/setuptoolsdeprecationwarning-setuppy-install-is-deprecated-use-build-and-pip-and-other-standards-based-tools/?answer=400052#post-id-400052)

Please let us know if the problem gets fixed!

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 10:06am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/8 "2023-01-10T10:06:29Z")

</div>

![tosen](https://get-help.robotigniteacademy.com/uploads/default/original/2X/2/2945c15771fac5b813bea62df762b9a17b9eb309.png)

setuptools warning solved. Thank you.

---

<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:** [January 10, 2023, 10:08am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/9 "2023-01-10T10:08:32Z")

</div>

Hi @oleg.a.kuvaev ,

Amazing!!! Glad that it worked for you!

I hope now you can submit your work to gradebot. Hopefully this time you won’t face any issues!

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 10:12am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/10 "2023-01-10T10:12:06Z")

</div>

![Screenshot from 2023-01-11 00-04-34](https://get-help.robotigniteacademy.com/uploads/default/original/2X/4/446afb42652b6b703c02a0a6514966199980ade1.png)

But this did not solve the global problem. GradeBot still throws a compilation error.  
What’s wrong? I don’t understand ☹

---

<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:** [January 10, 2023, 10:16am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/11 "2023-01-10T10:16:30Z")

</div>

Hi @oleg.a.kuvaev ,

Don’t panic!!! If you use up all your attempts, it can be reset by TheConstruct team.

Currently, there seems to be a problem with gradebot for this specific exercise:  
Refer: [ROS2 Basics in 5 Days Humble (C++) - 4.7 Services Quiz - #5 by albertoezquerro](https://get-help.robotigniteacademy.com/t/ros2-basics-in-5-days-humble-c-4-7-services-quiz/21408/5)

Keep following that post to stay informed when the problem gets fixed.

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![oleg.a.kuvaev](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/o/b2d939/32.png) [@oleg.a.kuvaev](https://get-help.theconstruct.ai/u/oleg.a.kuvaev)\
**Post date:** [January 10, 2023, 10:41am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/12 "2023-01-10T10:41:01Z")

</div>

Greate 😃  
My solution for this mistake:

1. **cd ~/ros2\_ws** and **rm -rf build install log**
2. **colcon build**
3. Verify in simulations
4. Again **cd ~/ros2\_ws** and **rm -rf build install log**
5. Sent to GradeBot **WITHOUT colcon build**

Profit 🙂

 ![profit](https://get-help.robotigniteacademy.com/uploads/default/original/2X/3/30c935ab624f0cf45e0abc3e9a0999231f7bdfb9.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:** [January 10, 2023, 10:44am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/13 "2023-01-10T10:44:56Z")

</div>

Hi @oleg.a.kuvaev ,

Awesome! You have found the solution yourself!

Also, thanks for sharing it!

> [@oleg.a.kuvaev](#):
>
> Sent to GradeBot **WITHOUT colcon build**

I was about to suggest you this step. But I was slightly unsure if that would work.  
Anyways glad you solved it!

Regards,  
Girish

---

<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:** [January 11, 2023, 10:44am UTC](https://get-help.theconstruct.ai/t/services-quiz-gradebot-fails-to-compile-the-package-how-fix-it/21515/14 "2023-01-11T10:44:59Z")

</div>

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