# AttributeError: ‘str’ object has no attribute ‘get\_attributes\_of\_object’

**URL:** https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559
**Category:** Rasa Open Source
**Created:** [June 13, 2021, 2:05pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559 "2021-06-13T14:05:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![anarucu](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@anarucu](https://forum.rasa.com/u/anarucu)
#### Post date: [June 13, 2021, 2:05pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/1 "2021-06-13T14:05:04Z")

</div>

Getting attribute error on running action ‘action\_query\_knowledge\_base’ Any ideas? Thanks in advance Ana

**rasa actions terminal**

2021-06-13 06:20:13 INFO rasa\_sdk.endpoint - Action endpoint is up and running on [http://0.0.0.0:5055](http://0.0.0.0:5055)

Exception occurred while handling uri: ‘[http://localhost:5055/webhook](http://localhost:5055/webhook)’

Traceback (most recent call last):

File “/lib/python3.8/site-packages/sanic/app.py”, line 938, in handle\_request

response = await response

File “/lib/python3.8/site-packages/rasa\_sdk/endpoint.py”, line 104, in webhook

result = await executor.run(action\_call)

File “/lib/python3.8/site-packages/rasa\_sdk/executor.py”, line 397, in run

events = await utils.call\_potential\_coroutine(

File “/lib/python3.8/site-packages/rasa\_sdk/utils.py”, line 230, in call\_potential\_coroutine

return await coroutine\_or\_return\_value

File “/lib/python3.8/site-packages/rasa\_sdk/knowledge\_base/actions.py”, line 137, in run

return await self.\_query\_objects(dispatcher, object\_type, tracker)

File “/lib/python3.8/site-packages/rasa\_sdk/knowledge\_base/actions.py”, line 161, in \_query\_objects

self.knowledge\_base.get\_attributes\_of\_object(object\_type)

AttributeError: ‘str’ object has no attribute ‘get\_attributes\_of\_object’

**rasa shell terminal**

ERROR rasa.core.processor - Encountered an exception while running action ‘action\_query\_knowledge\_base’.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

Traceback (most recent call last):

File “/media/amontalvo/Storage/Rasa/venv3.8\_Rasa2.0.x/lib/python3.8/site-packages/rasa/core/actions/action.py”, line 683, in run

```
response = await self.action_endpoint.request(

```

File “/media/amontalvo/Storage/Rasa/venv3.8\_Rasa2.0.x/lib/python3.8/site-packages/rasa/utils/endpoints.py”, line 154, in request

```
raise ClientResponseError(

```

rasa.utils.endpoints.ClientResponseError: 500, Internal Server Error, body=‘b’\xe2\x9a\xa0\xef\xb8\x8f 500 \xe2\x80\x94 Internal Server Error\n\n html { font-family: sans-serif }\n h2 { color: #888; }\n .tb-wrapper p { margin: 0 }\n .frame-border { margin: 1rem }\n .frame-line \> \* { padding: 0.3rem 0.6rem }\n .frame-line { margin-bottom: 0.3rem }\n .frame-code { font-size: 16px; padding-left: 4ch }\n .tb-wrapper { border: 1px solid #eee }\n .tb-header { background: #eee; padding: 0.3rem; font-weight: bold }\n .frame-descriptor { background: #e2eafb; font-size: 14px }\n \n

# \xe2\x9a\xa0\x\xb8\x8f 500 \xe2\x80\x94 Internal Server Error

The server encountered an internal error and cannot complete your request.\n’’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/media/amontalvo/Storage/Rasa/venv3.8\_Rasa2.0.x/lib/python3.8/site-packages/rasa/core/processor.py”, line 772, in \_run\_action

events = await action.run(

File “/media/amontalvo/Storage/Rasa/venv3.8\_Rasa2.0.x/lib/python3.8/site-packages/rasa/core/actions/action.py”, line 707, in run

raise RasaException(“Failed to execute custom action.”) from e rasa.shared.exceptions.RasaException: Failed to execute custom action.

---

<div class="post-metadata">

### Author: ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)
#### Post date: [June 13, 2021, 4:13pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/2 "2021-06-13T16:13:05Z")

</div>

> [@anarucu](#):
>
> attribute error

@anarucu Can you give a screenshot of error?

---

<div class="post-metadata">

### Author: ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)
#### Post date: [June 13, 2021, 4:27pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/3 "2021-06-13T16:27:35Z")

</div>

@anarucu[AttributeError: ‘str’ object has no attribute ‘get\_attributes\_of\_object’](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559)

This means : something try to find a ‘.get\_attributes\_of\_object’ attribute on the object that had given, and you had given it as an object of type `str` (i.e., a string).

---

<div class="post-metadata">

### Author: ![anarucu](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@anarucu](https://forum.rasa.com/u/anarucu)
#### Post date: [June 14, 2021, 11:21am UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/4 "2021-06-14T11:21:31Z")

</div>

Hey nik! The chitchat works fine with some rules, it fails when triggers the action\_query\_knowledge\_base! Here is a screenshot of the error in debug mode, it is not detecting the attribute.

thx again!

 ![Error2](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/510f72c4c3e5a85a34f422d5e988bc62910bc522.png) ![Screenshot from 2021-06-14 06-53-00](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/e/ebb7404da6d4e62ece668965929beea62b732aeb.jpeg)

---

<div class="post-metadata">

### Author: ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)
#### Post date: [June 14, 2021, 1:54pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/5 "2021-06-14T13:54:09Z")

</div>

@anarucu You need to check the action.py the code you wrote, it has some issue. Can I see the action file ? Did you run the action server at the next terminal window? rasa run actions

---

<div class="post-metadata">

### Author: ![anarucu](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@anarucu](https://forum.rasa.com/u/anarucu)
#### Post date: [June 14, 2021, 7:03pm UTC](https://forum.rasa.com/t/attributeerror-str-object-has-no-attribute-get-attributes-of-object/44559/7 "2021-06-14T19:03:05Z")

</div>

You were so right!! It was a misspelling in the action.py file. Thanks a lot for your time regards ana
