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

Failed To Set Up #18

Open
digitalcontemplation opened this issue Sep 22, 2024 · 0 comments
Open

Failed To Set Up #18

digitalcontemplation opened this issue Sep 22, 2024 · 0 comments

Comments

@digitalcontemplation
Copy link

Software Versions:
Network Scanner 1.0.7
Core 2024.9.2
Supervisor 2024.09.1
Operating System 13.1
Frontend 20240909.1

I attempted to understand them, but are likely beyond my understanding of this. If there is further information that would help, I'd be happy to include it.
This is after having checked the yaml configuration, and restarted the HA instance from Developer Tools.

Reason provided: Check the logs.

I received 3 logs:
Log 1:

Logger: homeassistant.helpers.event
Source: helpers/template.py:621
First occurred: 3:30:06 PM (7 occurrences)
Last logged: 3:34:34 PM

Error while processing template: Template<template=(## Devices | IP Address | MAC Address | Custom Name | Custom Description | Hostname | Vendor | |------------|-------------|-------------|--------------------|----------|--------| {% for device in state_attr('sensor.network_scanner', 'devices') %} | {{ device.ip }} | {{ device.mac }} | {{ device.name }} | {{ device.type }} | {{ device.hostname }} | {{ device.vendor }} | {% endfor %}) renders=10>
Error while processing template: Template<template=(## Devices | IP Address | MAC Address | Custom Name | Custom Description | Hostname | Vendor | |------------|-------------|-------------|--------------------|----------|--------| {% for device in state_attr('sensor.network_scanner', 'devices') %} | {{ device.ip }} | {{ device.mac }} | {{ device.name }} | {{ device.type }} | {{ device.hostname }} | {{ device.vendor }} | {% endfor %}) renders=14>
Error while processing template: Template<template=(## Devices | IP Address | MAC Address | Custom Name | Custom Description | Hostname | Vendor | |------------|-------------|-------------|--------------------|----------|--------| {% for device in state_attr('sensor.network_scanner', 'devices') %} | {{ device.ip }} | {{ device.mac }} | {{ device.name }} | {{ device.type }} | {{ device.hostname }} | {{ device.vendor }} | {% endfor %}) renders=18>
Error while processing template: Template<template=(## Devices | IP Address | MAC Address | Custom Name | Custom Description | Hostname | Vendor | |------------|-------------|-------------|--------------------|----------|--------| {% for device in state_attr('sensor.network_scanner', 'devices') %} | {{ device.ip }} | {{ device.mac }} | {{ device.name }} | {{ device.type }} | {{ device.hostname }} | {{ device.vendor }} | {% endfor %}) renders=22>
Error while processing template: Template<template=(## Devices | IP Address | MAC Address | Custom Name | Custom Description | Hostname | Vendor | |------------|-------------|-------------|--------------------|----------|--------| {% for device in state_attr('sensor.network_scanner', 'devices') %} | {{ device.ip }} | {{ device.mac }} | {{ device.name }} | {{ device.type }} | {{ device.hostname }} | {{ device.vendor }} | {% endfor %}) renders=26>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 619, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2654, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 3, in top-level template code
TypeError: 'NoneType' object is not iterable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 731, in async_render_to_info
    render_info._result = self.async_render(  # noqa: SLF001
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 621, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: TypeError: 'NoneType' object is not iterable

Log 2, Error setting up entry Network Scanner for network_scanner:

Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 3:30:28 PM (1 occurrences)
Last logged: 3:30:28 PM

Error setting up entry Network Scanner for network_scanner
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/network_scanner/__init__.py", line 12, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(config_entry, ["sensor"])
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2121, in async_forward_entry_setups
    await self._async_forward_entry_setups_locked(entry, platforms)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2132, in _async_forward_entry_setups_locked
    await asyncio.gather(
asyncio.exceptions.CancelledError

Log 3, Error setting up entry Network Scanner for sensor:

Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 3:30:28 PM (1 occurrences)
Last logged: 3:30:28 PM

Error setting up entry Network Scanner for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 130, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in async_setup_entry
    return await self._platforms[key].async_setup_entry(config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 328, in async_setup_entry
    return await self._async_setup_platform(async_create_setup_awaitable)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 644, in async_add_entities
    await add_func(coros, entities, timeout)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 553, in _async_add_and_update_entities
    results = await asyncio.gather(*tasks, return_exceptions=True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 724, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
    await self.async_update()
  File "/config/custom_components/network_scanner/sensor.py", line 53, in async_update
    devices = await self.hass.async_add_executor_job(self.scan_network)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant