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

[Bug] - Unexpected error fetching TrueNAS data #193

Open
Daviderusso93 opened this issue Dec 19, 2024 · 4 comments
Open

[Bug] - Unexpected error fetching TrueNAS data #193

Daviderusso93 opened this issue Dec 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Daviderusso93
Copy link

Describe the issue

Hi at all.
I have the same issue today (19 December 2024).

Both systems are on VM (Hyper-V).
They are connected with two different virtual connectors, which work on two different LAN cards.
From the HA VM I can ping the TrueNAS VM and it works the other way around too.
I can connect it with the API Key generated by TrueNAS, but I always get this error.

I saw the proposed solution by modifying the value of line 226 of the coordinator.py file (as was done with the old version 1.3) but it didn't work.
I've tried both 1.3 and 1.3.1, but neither seems to work.

How to reproduce the issue

Steps to reproduce the behavior:
Try to connect the Hass TrueNAS Integration with the TrueNAS system.

Expected behavior

I can control the TrueNAS information from my Home Assistant system

Screenshots

image

Software versions

Home Assistant version: 2024.12.24
TrueNAS Scale version: 24.10.1 (EletricEel-24.10.1)
TrueNAS integration for HA version: 1.3.1

Diagnostics data

Traceback/Error logs

Registratore: custom_components.truenas.coordinator
Fonte: helpers/update_coordinator.py:379
Integrazione: TrueNAS (documentazione, problemi)
Prima occorrenza: 09:34:04 (43 occorrenze)
Ultimo accesso: 14:08:06

Unexpected error fetching TrueNAS data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/truenas/coordinator.py", line 97, in _async_update_data
    await self.hass.async_add_executor_job(self.get_systemstats)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/truenas/coordinator.py", line 445, in get_systemstats
    max(tmp_graph[i]["aggregations"]["mean"].values()), 2
    ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty`

Additional context

@Daviderusso93 Daviderusso93 added the bug Something isn't working label Dec 19, 2024
Copy link
Owner

tomaae commented Dec 19, 2024

strange, I have tested it on VM.
I will need to see debugs for this one

@Daviderusso93
Copy link
Author

strange, I have tested it on VM.

I will need to see debugs for this one

In which way can i help you for resolve this issue?
Thanks

Copy link
Owner

tomaae commented Dec 20, 2024

I will need you to attach debug

@Daviderusso93
Copy link
Author

Daviderusso93 commented Dec 20, 2024

Ok, can I show you the complete debug of my Home Assistant?
Do you need something related to TrueNAS?

How can I send them to you? Thank you

On another site i have another device and i use the same integration, and it works perfectly.
The only difference is that:

Home Assistant is up on a VM (Hyper V)
TrueNAS is installed natively on another machine (not VM)

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

2 participants