thomasloven / hass-lovelace_gen

🔹 Improve the lovelace yaml parser for Home Assistant
MIT License
209 stars 22 forks source link

Type Error '__init__() takes 2 positional arguments but 3 were given' #29

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello. I'm trying to use Lovelace Gen but i'm receiving type error.

`2021-05-09 06:48:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for lovelace_gen 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-09 06:48:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for browser_mod 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-09 06:48:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs 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-09 06:48:18 WARNING (MainThread) [homeassistant.bootstrap] Support for the running Python version 3.7.3 is deprecated and will be removed in the first release after December 7, 2020. Please upgrade Python to 3.8.0 or higher. 2021-05-09 06:48:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2404703632] Error handling message: Unknown error Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/websocket_api/decorators.py", line 18, in _handle_async_response await func(hass, connection, msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/websocket.py", line 30, in send_with_error_handling result = await func(hass, connection, msg, config) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/websocket.py", line 72, in websocket_lovelace_config return await config.async_load(msg["force"]) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/dashboard.py", line 186, in async_load self._load_config, force File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config config = load_yaml(self.path) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 62, in load_yaml return parse_yaml(conf_file) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 73, in parse_yaml return yaml.load(content, Loader=SafeLineLoader) or OrderedDict() File "/srv/homeassistant/lib/python3.7/site-packages/yaml/init.py", line 114, in load return loader.get_single_data() File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data return self.construct_document(node) File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document data = self.construct_object(node) File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 201, in _ordered_dict nodes = loader.construct_pairs(node) File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs value = self.construct_object(value_node, deep=deep) File "/srv/homeassistant/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/yaml/loader.py", line 152, in _include_dir_named_yaml mapping[filename] = load_yaml(fname) File "/home/homeassistant/.homeassistant/custom_components/lovelace_gen/init.py", line 37, in load_yaml return loader.yaml.load(config_file, Loader=lambda stream: loader.SafeLineLoader(stream, secrets)) or OrderedDict() File "/srv/homeassistant/lib/python3.7/site-packages/yaml/init.py", line 112, in load loader = Loader(stream) File "/home/homeassistant/.homeassistant/custom_components/lovelace_gen/init.py", line 37, in return loader.yaml.load(config_file, Loader=lambda stream: loader.SafeLineLoader(stream, secrets)) or OrderedDict() TypeError: init() takes 2 positional arguments but 3 were given

`