treethought / flask-assistant

Framework for Building Virtual Assistants with Dialogflow and python
Apache License 2.0
379 stars 101 forks source link

KeyError in core.py #133

Closed sainimohit23 closed 3 years ago

sainimohit23 commented 4 years ago

Hi I am getting this error when dialogflow sends a POST request to the Flask API

127.0.0.1 - - [28/Apr/2020 15:14:49] "POST / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/v-mohit.saini/anaconda3/envs/assist/lib/python3.6/site-packages/flask_assistant/core.py", line 253, in _flask_assitant_view_func
    _dbgdump(self.request['result'])
KeyError: 'result'
treethought commented 3 years ago

hi @sainimohit23 are you using dialogflow v2 in your agent?