elad-bar / ha-shinobi

Shinobi Video custom component for HA
53 stars 5 forks source link

Media brower "Unknown Error" #55

Closed mtgpcs closed 4 months ago

mtgpcs commented 1 year ago

When trying to view the video in Home Assistant Media Browser I get "Unknown Error"

HA logs say

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/shinobi/managers/coordinator.py:206 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 10:31:44 AM (4 occurrences) Last logged: 10:39:42 AM

[140336025420096] Error handling message: Unknown error (unknown_error) User from 192.168.1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0)
[140335494176320] Error handling message: Unknown error (unknown_error) User from 192.168.1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0)

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/media_source/init.py", line 174, in websocket_browse_media media = await async_browse_media(hass, msg.get("media_content_id", "")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/media_source/init.py", line 125, in async_browse_media item = await _get_media_item(hass, media_content_id, None).async_browse() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/media_source/models.py", line 79, in async_browse return await self.async_media_source().async_browse_media(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/shinobi/media_source.py", line 118, in async_browse_media *await action(identifier), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/shinobi/media_source.py", line 214, in _async_build_monitors monitor_name = coordinator.get_monitor_device_name(monitor_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/shinobi/managers/coordinator.py", line 206, in get_monitor_device_name device_name = f"{self.name} {monitor.name}" ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'name'

I have removed the removed and re added via Devices, I also removed and re-installed via HACS. No changes.

elad-bar commented 1 year ago

can you please update to the latest component version and check again? in addition, what version of HA are you using?

thanks

elad-bar commented 10 months ago

@mtgpcs is it still relevant?

thanks