IBM / watson-voice-bot

Create a Watson Assistant chatbot that uses voice over a web browser.
https://developer.ibm.com/patterns/create-a-web-based-voice-chatbot/
Apache License 2.0
119 stars 157 forks source link

fatal error #48

Closed AutomataVM closed 5 years ago

AutomataVM commented 5 years ago

Hi! Whenever I am starting the service and want to talk, I receive this error on the server:

[2019-11-07 17:01:25,589] ERROR in app: Exception on /api/conversation [POST] Traceback (most recent call last): File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask_cors\ext ension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, kwargs))) File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask_compat. py", line 39, in reraise raise value File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "C:\xampp\htdocs\template_generator\venv\lib\site-packages\flask\app.py", line 1935, in dispatch_request return self.view_functions[rule.endpoint](req.view_args) File "welcome.py", line 132, in getConvResponse response = response.get_result() UnboundLocalError: local variable 'response' referenced before assignment

why could it be??

markstur commented 5 years ago

This happens when there is an earlier exception trying to call Watson Assistant. That error was probably printed before what is shown here.

AutomataVM commented 5 years ago

yes, I solved it now!