# Rasa Knowledge base object\_name error

**URL:** https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911
**Category:** Rasa Open Source
**Created:** [December 10, 2020, 5:23pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911 "2020-12-10T17:23:32Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 10, 2020, 5:23pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/1 "2020-12-10T17:23:32Z")

</div>

Hello so I began using rasa knowledge base via provided examples in the documentation. Everything works like it should except one thing. When I try to get object attribute for some reason {object\_name} comes up as `'<function KnowledgeBase.init.... at 0x7f1a093983b0>' has the value '1850–2200 W.' for attribute 'galia'.`

As you can see the {attribute\_value} and {attribute\_name} comes up as perfect strings. While {object\_name} comes up as some gibberish stuff.

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

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 11, 2020, 2:20pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/2 "2020-12-11T14:20:16Z")

</div>

@Juste Maybe you could help?

---

<div class="post-metadata">

### Author: ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)
#### Post date: [December 14, 2020, 11:12am UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/3 "2020-12-14T11:12:54Z")

</div>

Can you share the debug log output of the conversation that gave you the object name in the format you mentions?

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 14, 2020, 11:27am UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/4 "2020-12-14T11:27:44Z")

</div>

Im sorry I dont quite understood what you meant by that. Conversation goes smoothly and without errors. Its just the object\_name variable(constant, or entity whatever) comes up as “function KnowledgeBase.init… at 0x7f1a093983b0” while it should come up as an “Microwave”. If you could help me with providing the steps to debug it I would gladly follow them.

Thank you!

---

<div class="post-metadata">

### Author: ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)
#### Post date: [December 14, 2020, 12:02pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/5 "2020-12-14T12:02:54Z")

</div>

Did you modify any code? How does you json data look like?

How do you interact with your bot? One way would be via `rasa shell` via the command line. If you add `--debug` to that command you can see the debug output. Might help if you share that output here.

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 14, 2020, 12:23pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/6 "2020-12-14T12:23:39Z")

</div>

Hi currently I did not modified any code just used your tutorials and your git repos to create custom action that querries knowledge base (.json) and searches for objects. My json data is copy pasted from your tutorial in here [Knowledge Base Actions](https://rasa.com/docs/action-server/knowledge-bases/) except with additional attributes. I made a docker compose override file which looks like this. As you can see my KB actions.py file looks identical to this one [rasa-sdk/actions.py at master · RasaHQ/rasa-sdk · GitHub](https://github.com/RasaHQ/rasa-sdk/blob/master/rasa_sdk/knowledge_base/actions.py)

```auto
app:
    image: 'rasa/rasa-sdk:latest'
    volumes:
      - ./knowledge_base_data.json:/app/knowledge_base_data.json
      - ./actions:/app/actions
    expose:
      - '5055'
    depends_on:
      - rasa-production

```

Also I interact with my bot via Rasa x dashboard

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 14, 2020, 1:07pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/7 "2020-12-14T13:07:43Z")

</div>

Also I looked thru logs the only error I see is this one

```auto
/app/rasa_sdk/utils.py:160: UserWarning: Your versions of rasa and rasa_sdk might not be compatible. You are currently running rasa version 2.0.2 and rasa_sdk version 2.2.0a1.
app_1 | To ensure compatibility use the same version for both, modulo the last number, i.e. using version A.B.x the numbers A and B should be identical for both rasa and rasa_sdk.

```

and this console log for object\_name variable

```auto
app_1 | 2020-12-14 13:06:47 WARNING root - <function KnowledgeBase. __init__.<locals>.<lambda>.<locals>.<lambda> at 0x7f784848b3b0>

```

---

<div class="post-metadata">

### Author: ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)
#### Post date: [December 15, 2020, 8:30am UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/8 "2020-12-15T08:30:11Z")

</div>

I failed to reproduce the problem on the latest Rasa version using the [knowledgebasebot](https://github.com/RasaHQ/rasa/tree/master/examples/knowledgebasebot) example. Can you maybe update to the latest Rasa version and try again? Does the example `knowledgebasebot` work for you?

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 15, 2020, 10:59am UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/9 "2020-12-15T10:59:55Z")

</div>

Hi. As per your request I updated my Rasa package to `{"rasa":{"production":"2.1.2","worker":"2.1.2"},"rasa-x":"0.34.0"` Also downloaded knowledgebasebot /actions.py file and still got the same answer

```auto
'<function KnowledgeBase. **init**.... at 0x7f6c2399cb90>' has the value '1850–2200 W.' for attribute 'galia'.

```

![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c5b34aff4dc10f6b989368d4eb8ae4cab12e4f50.png)

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 15, 2020, 3:37pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/10 "2020-12-15T15:37:42Z")

</div>

I just tried your example bot on clean AWS Ubuntu instance. Went thru install.sh script. Added docker.override and custom action of your git repo. And still got the same problem

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c761b61d293a60fcd91e37d27c99ea740846c6df.png)

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [December 16, 2020, 1:51pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/11 "2020-12-16T13:51:41Z")

</div>

Also I noticed that to querry attribute the function querry\_object needs to be called first. Which means I cannot querry for attribute without first printing all the objects for the user. How can I go around that?

---

<div class="post-metadata">

### Author: ![hrabago](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/hrabago/32/14158_2.png) [@hrabago](https://forum.rasa.com/u/hrabago)
#### Post date: [March 30, 2021, 4:36pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/12 "2021-03-30T16:36:20Z")

</div>

Hi Im having the same issue. Were you able to resolve this by any chance?

---

<div class="post-metadata">

### Author: ![hrabago](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/hrabago/32/14158_2.png) [@hrabago](https://forum.rasa.com/u/hrabago)
#### Post date: [March 30, 2021, 8:45pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/13 "2021-03-30T20:45:25Z")

</div>

Updating rasa to the latest version(2.4.3) with **`pip install rasa --upgrade`** and fixing the **sanic** version requirement like it is mentioned [here](https://github.com/rasahq/rasa/issues/5019#issuecomment-569401623) fixed it for me! 👍

---

<div class="post-metadata">

### Author: ![xpresas](https://avatars.discourse-cdn.com/v4/letter/x/b5ac83/32.png) [@xpresas](https://forum.rasa.com/u/xpresas)
#### Post date: [March 30, 2021, 11:38pm UTC](https://forum.rasa.com/t/rasa-knowledge-base-object-name-error/37911/14 "2021-03-30T23:38:59Z")

</div>

@hrabago good for you. To be honest I worked with Rasa stuff like 3-4 months ago. All I can remmember I went into the code itself and fixed it myself. As I currently do not have access to the project I cant really tell what I did.
