-
Notifications
You must be signed in to change notification settings - Fork 17
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
Expected template to be a string - Multiscrape can not be setup #312
Comments
The example provided with the components works well. The difference is that i use a form submit to authenticate before scraping.
Then it states again string expected. |
I am getting the same since doing the update to home assistant. This is my error log, and it looks to be the same as yours. Logger: homeassistant.setup Error during setup of component multiscrape |
I have found a solution for me. I followed the code in the stacktrace and swa it was happening at reading headers from the config. I removed my part of the configuration (which worked for a long time before) and it is working again.
I removed the headers part and it is working for now. Still i am in favour of having headers so a structural solution is preferred. |
Same error for me on this version of Multiscrape and HA. |
I can confirm what @bios2bios reported. I just commented out the headers section and restarted and multiscrape worked again. |
Maybe someone knows how to make a template - list because this section has changed from string - list to template - list. headers - The headers for the requests. - False - template - list I dont know how to do. |
Since this morning my multiscrape integration does not work anymore. I did not change anything in the configuration.
The changes where upgrading multiscrape to the latest and home assistant to the latest
Multitscrape version 6.8.0
HA 2024.1
I tried to revert the multiscrape to the previous version but did not work out and not help in getting rid of the message. I also tried to minimize the number of sensors defined in the configuration. Just only a resource and a simple sensor.
The message in the loggs of HA provide the following information
Logger: homeassistant.setup
Source: setup.py:332
First occurred: 11:04:26 (1 occurrences)
Last logged: 11:04:26
Error during setup of component multiscrape
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 332, in _async_setup_component
result = await task
^^^^^^^^^^
File "/config/custom_components/multiscrape/init.py", line 89, in async_setup
return await _async_process_config(hass, entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/multiscrape/init.py", line 151, in _async_process_config
http = _create_scrape_http_wrapper(config_name, conf, hass, file_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/multiscrape/init.py", line 237, in _create_scrape_http_wrapper
headers_renderer=create_dict_renderer(hass, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/multiscrape/util.py", line 36, in create_dict_renderer
templates_dict[item] = create_renderer(hass, templates_dict[item])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/multiscrape/util.py", line 15, in create_renderer
value_template = Template(value_template, hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 469, in init
raise TypeError("Expected template to be a string")
TypeError: Expected template to be a string
The text was updated successfully, but these errors were encountered: