Hi, I download the reminderbot code from here . I want to see how does ReminderScheduled work.
I run rasa train and rasa shell, talk with bot like this:
Your input -> hi
What can I do for you?
Your input -> remind me to call John
I will remind you in 5 seconds.
Your input ->
I expects bot answer “Remember to call John”. But it dosen’t happen. Is this right?
nik202
(NiK202)
March 1, 2022, 2:41pm
2
can you share the rasa --version
and error traceback or run the code in rasa shell --debug
Rasa 3.0.8
in first termianl
asa run actions
second terminal
python callback_server.py
third terminal
rasa run --enable-api
fourth terminal
curl -X POST http://localhost:5005/webhooks/callback/webhook
the error is
Traceback (most recent call last):
File "handle_request", line 83, in handle_request
class Sanic(BaseSanic, metaclass=TouchUpMeta):
File "c:\users\gerrycheung\anaconda3\envs\rasa\lib\site-packages\rasa\core\channels\callback.py", line 72, in webhook
sender_id = await self._extract_sender(request)
File "c:\users\gerrycheung\anaconda3\envs\rasa\lib\site-packages\rasa\core\channels\rest.py", line 52, in _extract_sender
return req.json.get("sender", None)
AttributeError: 'NoneType' object has no attribute 'get'
nik202
(NiK202)
March 2, 2022, 1:36pm
4
send a message instead of text in your request.json
{ “sender”: “Rasa”, “message”: “Hi” }
hi @nik202 ,
Thank you for your help.
I try this, but it still dosen’t work.
curl http://localhost:5005/webhooks/callback/webhook -d '{"sender": "Rasa", "message": "hello"}' -H 'Content-Type: application/json'
the result is:
<!DOCTYPE html><html lang=en><meta charset=UTF-8><title>⚠️ 400 — Badd Request</title>
<style>
html { font-family: sans-serif }
h2 { color: #888; }
.tb-wrapper p { margin: 0 }
.frame-border { margin: 1rem }
.frame-line > * { padding: 0.3rem 0.6rem }
.frame-line { margin-bottom: 0.3rem }
.frame-code { font-size: 16px; padding-left: 4ch }
.tb-wrapper { border: 1px solid #eee }
.tb-header { background: #eee; padding: 0.3rem; font-weight: bold }
.frame-descriptor { background: #e2eafb; font-size: 14px }
</style>
<h1>⚠️ 400 — Bad Request</h1><p>Faailed when parsing body as json
curl: (6) Could not resolve host: Rasa,
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched close brace/bracket in URL position 6:
hello}'
^
Hi @gerrycheung were you able to solve this? I’m getting ‘Nonetype’ error too same as yours with /webhooks/rest/webhook