# Some times tracker.get\_slots() return as None value

**URL:** <https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477>\
**Category:** Rasa Open Source\
**Created:** [September 28, 2018, 11:22am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477 "2018-09-28T11:22:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshmi](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lakshmi](https://forum.rasa.com/u/lakshmi)\
**Post date:** [September 28, 2018, 11:22am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/1 "2018-09-28T11:22:31Z")

</div>

Hi

I’m trying custom actions in my Bot application using Python script

> def run(self, dispatcher, tracker, domain): print(tracker.get\_slot(‘PERSON’))

Following is my trained data

> Looking for Muthu

When I type “Looking for Muthu” in Bot UI the tracker returns “Muthu” as entity/slot

But I type “Looking for Venu” the tracker returns none

It cann’t able to identify the other than Muthu as Person entity.

I’m using following configuration

pipeline:

- name: “nlp\_spacy”
- name: “tokenizer\_spacy”
- name: “intent\_entity\_featurizer\_regex”
- name: “intent\_featurizer\_spacy”
- name: “ner\_crf”
- name: “ner\_spacy”
- name: “ner\_synonyms”
- name: “intent\_classifier\_sklearn”

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [September 28, 2018, 11:39am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/2 "2018-09-28T11:39:32Z")

</div>

> [@lakshmi](#):
>
> PERSON

Are you training this entity extraction using CRF? This article might help

> **[Entity extraction with the new lookup table feature in Rasa NLU](https://medium.com/rasa-blog/entity-extraction-with-the-new-lookup-table-feature-in-rasa-nlu-94c6c30876a3)**
>
> Entity extraction is one of the most important tasks of any NLU system, where the goal is to extract meaningful information from text. For…

---

<div class="post-metadata">

**Author:** ![lakshmi](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lakshmi](https://forum.rasa.com/u/lakshmi)\
**Post date:** [October 3, 2018, 10:44am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/3 "2018-10-03T10:44:28Z")

</div>

Thanks for the reply souvikg , As per the link I upgraded my RASA - NLU version to 0.13

And added the ## lookup: PERSON data/Person/Person.txt

Then train my data by using the following command python trainer.py train-all

But the lookup element doesn’t add in training\_data.json

Do I miss anything?

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [October 3, 2018, 11:34am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/4 "2018-10-03T11:34:21Z")

</div>

Not sure what is the issue, you just need to add the lookup object in your training data and train a CRF with some of the examples from your lookup to create a patter of identification

```auto
"lookup_tables": [ 
                {
                    "name": "company",
                    "elements": "data/company/startups.csv"
                }
        ],

```

---

<div class="post-metadata">

**Author:** ![syedrizvi](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@syedrizvi](https://forum.rasa.com/u/syedrizvi)\
**Post date:** [October 4, 2018, 6:36am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/5 "2018-10-04T06:36:34Z")

</div>

Hi Lakshmi,

If i am trying to print tracker.get\_slot(’’) i am getting the below error TabError: inconsistent use of tabs and spaces in indentation

My exact statement looks like - print(tracker.get\_slot(‘cuisine’))

Just wanted to see the values present in the slots in my customized action.

Do you have any inputs ?

Thanks.

---

<div class="post-metadata">

**Author:** ![syedrizvi](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@syedrizvi](https://forum.rasa.com/u/syedrizvi)\
**Post date:** [October 4, 2018, 6:42am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/6 "2018-10-04T06:42:14Z")

</div>

It got resolved…Some issue with the tab fields in that line…Deleted and wrote again.Thanks!

---

<div class="post-metadata">

**Author:** ![lakshmi](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lakshmi](https://forum.rasa.com/u/lakshmi)\
**Post date:** [October 4, 2018, 9:43am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/7 "2018-10-04T09:43:05Z")

</div>

Hi

Yes I did , Following are the steps done

1, Upgraded rasa\_nlu : 0.13.5

2, Added Lookup\_tables in MD file instead of json

> ## lookup:Person
> 
> data/Person/Person.txt

3, Then updated config file as follows

> pipeline:
> 
> - name: “nlp\_spacy”
> 
> - name: “tokenizer\_spacy”
> 
> - name: “intent\_entity\_featurizer\_regex”
> 
> - name: “intent\_featurizer\_spacy”
> 
> - name: “ner\_spacy”
> 
> - name: “ner\_synonyms”
> 
> - name: “intent\_classifier\_sklearn”
> 
> - **name: “ner\_crf”**

Then i executed train command . My training\_data.json has the following update

> “lookup\_tables”: [{ “name”: “Person”, “elements”: “data/Person/Person.txt” }],

Now I’m running rasa\_nlu server Still I’m getting None response for Tracker

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [October 4, 2018, 3:23pm UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/8 "2018-10-04T15:23:57Z")

</div>

is your slot\_name the same as the entity name?

PERSON?

can you simply call the NLU to see if the Person entity is detected or not

---

<div class="post-metadata">

**Author:** ![lakshmi](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lakshmi](https://forum.rasa.com/u/lakshmi)\
**Post date:** [October 5, 2018, 5:15am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/9 "2018-10-05T05:15:48Z")

</div>

Yes it is PERSON

> print(tracker.get\_slot(‘PERSON’))

It detects the PERSON entity, thus why i mentioned **sometimes** getting None value.

In my training data, added some examples like

> Looking for Muthu

> Would like to about Lakshmi

So “print(tracker.get\_slot(‘PERSON’))” can able to returns **Muthu** or **Lakshmi**. If i try some other names its prints nothing

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [October 6, 2018, 11:54am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/10 "2018-10-06T11:54:23Z")

</div>

I will have to test the pipeline to see why this isn’t working. Will let you know

---

<div class="post-metadata">

**Author:** ![lakshmi](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lakshmi](https://forum.rasa.com/u/lakshmi)\
**Post date:** [October 9, 2018, 4:45am UTC](https://forum.rasa.com/t/some-times-tracker-get-slots-return-as-none-value/1477/11 "2018-10-09T04:45:04Z")

</div>

Hi

Can anybody have solution for this issue
