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

Unexpected exception: list index out of range. #403

Open
leviowen opened this issue Nov 25, 2024 · 4 comments
Open

Unexpected exception: list index out of range. #403

leviowen opened this issue Nov 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@leviowen
Copy link

Describe the bug

This error originated from a custom integration.

Logger: custom_components.hildebrandglow_dcc.sensor
Source: custom_components/hildebrandglow_dcc/sensor.py:183
integration: Hildebrand Glow (DCC) (documentation, issues)
First occurred: November 24, 2024 at 1:33:44 AM (78 occurrences)
Last logged: 8:33:43 AM

Unexpected exception: list index out of range. Please open an issue
Traceback (most recent call last):
File "/config/custom_components/hildebrandglow_dcc/sensor.py", line 183, in daily_data
return readings[0][1].value
~~~~~~~~^^^
IndexError: list index out of range

To Reproduce
Steps to reproduce the behaviour:

  1. no idea, everything just stopped updating

Expected behaviour.

Screenshots.

Version
What version of the integration and what version of Home Assistant are you running?
Hildebrand Glow - 1.0.3
HAOS - core 2024.11.3
supervisor 2024.11.4
OS - 13.2
Front end - 20241106.2

Debug log
Enable debug logging by following the instructions here

Additional context
Add any other context about the problem here.

@leviowen leviowen added the bug Something isn't working label Nov 25, 2024
@dcspaul
Copy link

dcspaul commented Nov 27, 2024

me too.

@crazyasyou
Copy link

crazyasyou commented Nov 29, 2024

I've had different issues and have 'hack'ed' my own version of sensor.py with bits from different peoples forks and some of my own stuff - I'm not a programer, so try it at your own risk, but this works just fine for me.

Note. I've added a fair few bits to _LOGGER.warning as I like the detail in my HA logs, if you don't then just change some of them to _LOGGER.debug(

Use the file editor addon for HA and edit /homeassistant/custom_components/hildebrandglow_dcc/sensor.py

had to drop into a txt file to allow upload.

sensor.py.txt

@crazyasyou
Copy link

Here is what my logs look like with my edited/hacked senory.py

image

@bucklevision
Copy link

Also here
This error originated from a custom integration.

Logger: custom_components.hildebrandglow_dcc.sensor
Source: custom_components/hildebrandglow_dcc/sensor.py:196
integration: Hildebrand Glow (DCC) (documentation, issues)
First occurred: 01:33:36 (42 occurrences)
Last logged: 11:33:36

Unexpected exception: list index out of range. Please open an issue
Traceback (most recent call last):
File "/config/custom_components/hildebrandglow_dcc/sensor.py", line 196, in daily_data
v = readings[0][1].value
~~~~~~~~^^^
IndexError: list index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants