HEnquist / camillagui-backend

Backend server for camillagui
GNU General Public License v3.0
18 stars 4 forks source link

Error when gui-config.yml is missing #29

Closed bitkeeper closed 3 years ago

bitkeeper commented 3 years ago

When the gui-config.yml is not present to gui stays an black empty screen (just shows one quick flash).

Backend reports:

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.7/dist-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/opt/camillagui/backend/views.py", line 303, in get_gui_config
    with open(gui_config_path) as yaml_config:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/camillagui/config/gui-config.yml'

This is changed behaviour. In the previous version didn't required to have this config file present.

JWahle commented 3 years ago

Is this on the final050 branch? I cannot reproduce the issue there - not sure, what causes it. I'm using Ubuntu + Chrome/Firefox.

JWahle commented 3 years ago

Okay, I have to clarify - the error was always, and still is, thrown. It just didn't result in a black screen. The frontend just got a HTTP 500 and did not complain otherwise. And that is the behavior, that I am still seeing right now.

HEnquist commented 3 years ago

I added some nicer handling of this now. If the gui_config file is missing, it uses default values that are given in settings.py.

JWahle commented 3 years ago

Works nicely.