ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
39 stars 10 forks source link

'Unexpected error' at initial set up #1

Closed 35gh closed 1 year ago

35gh commented 1 year ago

Hi,

First of all, thank you for this integration!

When I try to set up my server I get an 'Unexpected error' message. ipmitool works perfectly. Board: Supermicro HA: 22023.6.2

From logs:

Logger: custom_components.ipmi.config_flow
Source: custom_components/ipmi/__init__.py:267
Integration: IPMI connector (documentation)
First occurred: 11:11:10 (4 occurrences)
Last logged: 11:35:19
Unexpected exception

Traceback (most recent call last):
  File "/config/custom_components/ipmi/config_flow.py", line 177, in _async_validate_or_error
    info = await validate_input(self.hass, config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipmi/config_flow.py", line 71, in validate_input
    await hass.async_add_executor_job(nut_data.update)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipmi/__init__.py", line 267, in update
    id_string = re.sub('[^0-9a-zA-Z ]+', '', name)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/re/__init__.py", line 185, in sub
    return _compile(pattern, flags).sub(repl, string, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Thanks!

ateodorescu commented 1 year ago

Hi!

Please get latest and check if it works.

Thanks!

35gh commented 1 year ago

It works, thanks! I've seen a bunch of other issues, I'll open separate tickets.