synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
948 stars 101 forks source link

HTTP API UI not available in web browser #67

Closed koenvervloesem closed 4 years ago

koenvervloesem commented 4 years ago

According to the documentation, I can "visit /api on your Rhasspy web server (e.g., http://localhost:12101/api)." I also remember I was able to do this in the past and I saw a nice UI in my web browser. However, when I'm doing it now (Rhasspy 2.4 on Ubuntu 19.10 amd64, installed in a Python virtual environment), I get a 404 error:

INFO:quart.serving:127.0.0.1:36168 GET /api 1.1 500 13 2788
[2019-12-12 09:00:14,759] 127.0.0.1:36168 GET /api 1.1 500 13 2788
ERROR:__main__:NotFound(404)
Traceback (most recent call last):
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1544, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1586, in dispatch_request
    raise request_.routing_exception
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/ctx.py", line 45, in match_request
    self.request_websocket.url_rule, self.request_websocket.view_args = self.url_adapter.match()  # noqa
  File "/home/koan/rhasspy/.venv/lib/python3.7/site-packages/quart/routing.py", line 288, in match
    raise NotFound()
quart.exceptions.NotFound: NotFound(404)

Meanwhile, with rhasspy-client I can perfectly access the API endpoints.

synesthesiam commented 4 years ago

I had originally taken it out because I moved to the quart web framework, which didn't have support for that extension (swagger ui). But it looks like another plugin is now available that might be able to fill the gap.

Thanks. Leaving this as a note for myself.

synesthesiam commented 4 years ago

Should be available now in 2.4.14