gjbadros / hass-vantage

Home Assistant custom_component for Vantage Infusion Whole House lighting system.
MIT License
9 stars 5 forks source link

AttributeError: 'NoneType' object has no attribute 'text' #12

Closed ptr727 closed 1 year ago

ptr727 commented 3 years ago

I'm trying to add my vantage infusion system to HA. Running HA in docker. Relying on automatic pip dependency install in venv.

Installed in config:

cd custom_components
git clone https://github.com/colohan/hass-vantage.git vantage

Config:

vantage:
  host: !secret vantage_host

Error:

2021-05-11 13:15:14 WARNING (MainThread) [homeassistant.loader] You are using a custom integration vantage which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-05-11 13:15:14 ERROR (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'vantage'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'vantage'
2021-05-11 13:15:48 ERROR (MainThread) [homeassistant.setup] Error during setup of component vantage
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component
    result = await task
  File "/config/custom_components/vantage/__init__.py", line 166, in async_setup
    await hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/var/tmp/homeassistant-venv/lib/python3.8/site-packages/pyvantage/__init__.py", line 1142, in load_xml_db
    self.do_parse(xml_db)
  File "/var/tmp/homeassistant-venv/lib/python3.8/site-packages/pyvantage/__init__.py", line 1153, in do_parse
    parser.parse()
  File "/var/tmp/homeassistant-venv/lib/python3.8/site-packages/pyvantage/__init__.py", line 351, in parse
    lgroup = self._parse_load_group(lg_xml)
  File "/var/tmp/homeassistant-venv/lib/python3.8/site-packages/pyvantage/__init__.py", line 631, in _parse_load_group
    out_name = output_xml.find('DName').text
AttributeError: 'NoneType' object has no attribute 'text'

Config file does get downloaded, but parsing fails.

2021-05-11 14:28:49 DEBUG (SyncWorker_4) [pyvantage] done reading, size = 1385022
2021-05-11 14:28:49 INFO (SyncWorker_4) [pyvantage] wrote file /config/192.168.1.3_config.txt
2021-05-11 14:28:49 INFO (SyncWorker_4) [pyvantage] Loaded xml db

Same error when testing using pyvantage in Python.

Looks like it may be error when parsing <DName></DName>, my config has many empty nodes.

Please PM me for copy of config file.

FletchFFletcherson commented 2 years ago

I am working on the same issue for my Vantage system. I think what version controller and Design Center version may have something to do with it. Can you tell me what version controller you are using. e.g. my controller is a IC-24-1 and I am running Design Center 3.9.2

Thanks!

Pete...

ptr727 commented 2 years ago

I run IC-36-I and 3.9.1.

ben-j-h commented 1 year ago

This many fix your issue, I had a similar one and it fixed mine. https://github.com/ben-j-h/pyvantage/commit/9cd93c2f5e7c837860ac3ebed89b25704eb21a9b

ptr727 commented 1 year ago

Fixed in pyvantage, thank you.