core icon indicating copy to clipboard operation
core copied to clipboard

command_line async_setup_platform raises `TypeError` `NoneType` is not subscriptable

Open yarikoptic opened this issue 9 months ago • 4 comments

The problem

(I think after some recent upgrade) my hassio setup stopped showing its pretty web UI face. homeassistant logs showed some "bad marshal data", I did su repair two times although both didn't finish I believe and it looked like

image

so some filesystem errors... after that and reboot pretty face is still not loading fully but at least shows up and reports

image

and I can't fully get web UI interface to load -- just keeps showing

image

homeassistant logs shows

image

and looking at the code there: https://github.com/home-assistant/core/blob/dev/homeassistant/components/command_line/switch.py#L32C11-L32C31 it seems a little off as the method signature type annotation allows for it to be None: discovery_info: DiscoveryInfoType | None = None, but then unconditionally does that subscript access: discovery_info[CONF_NAME] .

What version of Home Assistant Core has the issue?

web ui doesn't load

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

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

yarikoptic avatar May 05 '24 16:05 yarikoptic

Please see https://community.home-assistant.io/t/psa-2024-5-upgrade-failure-and-dreame-vacuum-custom-integration/724612

bdraco avatar May 05 '24 16:05 bdraco

THANK YOU @bdraco . after I did core update --version 2024.4.4 I feel like I got back to prior flood of different errors, this particular traceback in addition, and web ui again similarly just

image

... actually it seems I can access Settings so will look at disabling or ugprading dreamy...

yarikoptic avatar May 05 '24 16:05 yarikoptic

Its also possible you have more than one integration causing issues.

Please see https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441

bdraco avatar May 05 '24 16:05 bdraco

thanks again @bdraco . after upgrade of dreamy to v2.0.0b14 it doesn't load but the HA itself upgraded fine and seems to boot fine, so overall HA loading issue is resolved. I also do not observe original exception with TypeError but for that one to not happen as exception - proposing

  • #116873

yarikoptic avatar May 05 '24 18:05 yarikoptic

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.