# Tracker.get\_slot() returns None value

**URL:** <https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531>\
**Category:** Rasa Open Source\
**Created:** [March 21, 2021, 1:15pm UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531 "2021-03-21T13:15:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elliot](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@Elliot](https://forum.rasa.com/u/Elliot)\
**Post date:** [March 21, 2021, 1:15pm UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531/1 "2021-03-21T13:15:56Z")

</div>

Hey guys, i am new to Rasa 2.0. I am currently working on a student project which calculates the total price for food that user orders. However, I keep getting TypeError which means tracker.get\_slot() returns None value. The code of my custom action is shown below:

 ![custom action](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/f8c0d039b20d77722b47bbfab2112d785199fd6c.png)

I ran the shell with debug mode and it indicates that all the slots are filled:

 ![slots](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/d3b73fa5f54ebcbce4448bc49cedc8a56ba1857a.png)

The error shown on my action server:

 ![action server](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/dad40e4a3b2e15392731b8e020198a9522a68237.png)

The code for rules.yml:

 ![rules](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/dae6b098b4611f14cd88ddac3583a4bcfc841ac6.png)

The template that i used for the custom action:

 ![template](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/1cfe4a2cfb5fcc463dd27d6d0470fe5b6921fb9a.png)

I am a bit confused about the purpose of requested\_slot. Does tracker.get\_slot() return the value from requested\_slot? Because requested\_slot is set to null in my rules.yml.

that will be much appreciated if someone can help me out here!

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [March 23, 2021, 10:07am UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531/2 "2021-03-23T10:07:38Z")

</div>

Hi @Elliot . I think the error occurs because for some reason the slot `drinks_num` returns `None` for you. Are you filling in this slot with a form? I think what is happening is that in your rules with `requested_slot: null` you are resetting last requested slot to none. Is there a particular reason why you have this step in your rules?

After your form completes (collects the necessary data), you should submit the form with your custom action. I don’t think I can see that happening in your rules. The rules could look something like the following:

```auto
rule: submit_drinks
condition:
- active_loop: drinks_from
steps:
  - actions: drinks_form
  - active_loop: null
  - action_order_confirmed
  - slot_was_set:
    - total: 100
  - action: utter_order_confirmed

```

---

<div class="post-metadata">

**Author:** ![Elliot](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@Elliot](https://forum.rasa.com/u/Elliot)\
**Post date:** [March 24, 2021, 12:05am UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531/3 "2021-03-24T00:05:55Z")

</div>

Hey Juste, thanks for your message! I have solved the problem. Once again, thank you very much 🙂

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [March 24, 2021, 10:58am UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531/4 "2021-03-24T10:58:55Z")

</div>

No worries @Elliot . Glad you solved it and I am looking forward to seeing what AI assistants you build with Rasa! 🙂

---

<div class="post-metadata">

**Author:** ![Elliot](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@Elliot](https://forum.rasa.com/u/Elliot)\
**Post date:** [March 25, 2021, 12:37pm UTC](https://forum.rasa.com/t/tracker-get-slot-returns-none-value/41531/5 "2021-03-25T12:37:14Z")

</div>

Hey Juste. Thanks for your message. I am currently working on an AI assistant which take orders from users for the restaurant. And this is one of my capstone project 🙂
