Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening install choose dialog triggers 500 for new configurations #342

Open
balloob opened this issue Oct 19, 2022 · 0 comments
Open

Opening install choose dialog triggers 500 for new configurations #342

balloob opened this issue Oct 19, 2022 · 0 comments

Comments

@balloob
Copy link
Member

balloob commented Oct 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant