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

Source: components/dlna_dmr/config_flow.py:477 AttributeError: 'NoneType' object has no attribute 'lower' #63575

Closed
628426 opened this issue Jan 7, 2022 · 3 comments · Fixed by #63892
Assignees

Comments

@628426
Copy link

628426 commented Jan 7, 2022

The problem

I see the following error in the logs after restarts and semie regularly.

Logger: homeassistant
Source: components/dlna_dmr/config_flow.py:477
First occurred: 10:42:34 (1 occurrences)
Last logged: 10:42:34

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 74, in async_process_pending_flows
await gather_with_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 170, in gather_with_concurrency
return await gather(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in sem_task
return await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 203, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 230, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data, init_done)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/config_flow.py", line 213, in async_step_ssdp
if _is_ignored_device(discovery_info):
File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/config_flow.py", line 477, in _is_ignored_device
manufacturer = discovery_info.upnp.get(ssdp.ATTR_UPNP_MANUFACTURER, "").lower()
AttributeError: 'NoneType' object has no attribute 'lower'

What version of Home Assistant Core has the issue?

core-2021.12.8

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Unable to tell

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant
Source: components/dlna_dmr/config_flow.py:477
First occurred: 10:42:34 (1 occurrences)
Last logged: 10:42:34

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
    await gather_with_concurrency(
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 170, in gather_with_concurrency
    return await gather(
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in sem_task
    return await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 203, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 230, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/config_flow.py", line 213, in async_step_ssdp
    if _is_ignored_device(discovery_info):
  File "/usr/src/homeassistant/homeassistant/components/dlna_dmr/config_flow.py", line 477, in _is_ignored_device
    manufacturer = discovery_info.upnp.get(ssdp.ATTR_UPNP_MANUFACTURER, "").lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Additional information

System Health

version core-2021.12.8
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.88
arch x86_64
timezone Australia/Brisbane
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 387
Installed Version 1.18.0
Stage running
Available Repositories 992
Installed Repositories 1
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 7.1
update_channel stable
supervisor_version supervisor-2021.12.2
docker_version 20.10.9
disk_total 31.3 GB
disk_used 3.9 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Check Home Assistant configuration (3.9.0), Studio Code Server (3.7.0), Terminal & SSH (9.3.0)
Lovelace
dashboards 2
resources 0
views 1
mode storage
@probot-home-assistant
Copy link

dlna_dmr documentation
dlna_dmr source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @StevenLooman, @chishm, mind taking a look at this issue as it has been labeled with an integration (dlna_dmr) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@chishm
Copy link
Contributor

chishm commented Jan 11, 2022

Thank you for the bug report. This looks like a DLNA device has something strange in its UPnP root description. I'll make _is_ignored_device more tolerant of such cases.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants