hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

Command returning "Internal Server Error

Open marcusds opened this issue 2 years ago • 1 comments

While trying to use :5000/command?message=something

I get: {"message": "Internal Server Error"}

In the log I get:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/dist-packages/flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/flask/views.py", line 88, in view
    return self.dispatch_request(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/hassio_gassistant.py", line 49, in get
    response_text, response_html = assistant.assist(text_query=message)
  File "/hassio_gassistant.py", line 132, in assist
    text_response = resp.dialog_state_out.supplemental_display_text()
TypeError: 'str' object is not callable
INFO:werkzeug:192.168.86.50 - - [03/May/2022 15:37:05] "GET /command?message=What%20time%20is%20it HTTP/1.1" 500 -

Seems to come down to: TypeError: 'str' object is not callable

Broadcasts however seem to work fine.

marcusds avatar May 03 '22 22:05 marcusds

The command you entered is a question. It is trying to respond to this package but the package can't handle responses (at least that I know of). Just do commands.

calisro avatar May 09 '22 15:05 calisro