samclane / LIFX-Control-Panel

As LIFX no longer supports their Windows 10 app, I created an open-source alternative for controlling LIFX-brand smart lights.
https://github.com/samclane/LIFX-Control-Panel
MIT License
161 stars 19 forks source link

AttributeError: 'Device' object has no attribute 'get_color' #147

Open Japh opened 1 year ago

Japh commented 1 year ago

Describe the bug The application does not launch successfully, instead showing the following error messages:

Every launch attempt showed this message:

Unhandled runtime exception: Traceback (most recent call last):
  File "lifx_control_panel\__main__.pyw", line 335, in main
  File "lifx_control_panel\__main__.pyw", line 101, in __init__
  File "lifx_control_panel\__main__.pyw", line 190, in scan_for_lights
  File "lifxlan\frames.py", line 93, in __init__
  File "lifxlan\frames.py", line 148, in _get_light_info
AttributeError: 'Device' object has no attribute 'get_color'

Please report this at:
https://github.com/samclane/lifx_control_panel/issues

To Reproduce Steps to reproduce the behavior:

  1. Download v2.3.1 (latest) lifx_control_panel.exe from release
  2. Open executable
  3. See error

Expected behavior I'd expect the application to simply launch/open, but it errors out. When ok is pressed, both the error window and the purple splashscreen close. Running the executable with administrator rights does not do anything.

Screenshots

Primary error I was seeing Screenshot 2023-10-05 093558

I saw this error once also, but couldn't get it to appear a second time, so not sure what that one was caused by Screenshot 2023-10-05 093201

I saw this error once also, but couldn't get it to appear a second time, so not sure what that one was caused by Screenshot 2023-10-05 105005

Desktop (please complete the following information):

Please attach your logfile (lifx-control-panel.log) No log files was generated, however I logged the output of the debug version of the release to the same filename which I provide here. This seems to indicate that the code does not cater to non-light devices (in this case, a LIFX switch), and doesn't fail gracefully.

lifx-control-panel.log

Additional context None.

Japh commented 1 year ago

I suspect the two one-off errors are unrelated, and due to some kind of collision or race condition failing hard. Each of those only happened once.