dashboard
dashboard copied to clipboard
Opening install choose dialog triggers 500 for new configurations
The Install Choose dialog fetches the information about a configuration from the backend when it's opened so it can determine if the configuration is using ethernet or not. This information is only created when the configuration is compiled, and so it's not available for new configurations.
STR:
- Create new YAML file
- Open install dialog
- 500 error in logs
2022-10-19 12:08:05,607 ERROR Uncaught exception GET /info?configuration=picow.yaml (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:6052', method='GET', uri='/info?configuration=picow.yaml', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/Users/paulus/dev/hass/esphome/venv/lib/python3.9/site-packages/tornado/web.py", line 1702, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/Users/paulus/dev/hass/esphome/esphome/dashboard/dashboard.py", line 136, in decorator
return func(self, *args, **kwargs)
File "/Users/paulus/dev/hass/esphome/esphome/dashboard/dashboard.py", line 161, in decorator
return func(self, *args, **kwargs)
File "/Users/paulus/dev/hass/esphome/esphome/dashboard/dashboard.py", line 779, in get
self.write(DashboardEntry(yaml_path).storage.to_json())
AttributeError: 'NoneType' object has no attribute 'to_json'
Solution is to use the new json-config API from #338 to see if the ethernet component is configured.
Backend should also be updated to return a 404 and that should be handled.
@balloob still a thing?