alryaz / hass-yandex-music-browser

Yandex Media Browser
64 stars 9 forks source link

Не открывает понравившиеся исполнители #9

Open eratnik opened 2 years ago

eratnik commented 2 years ago

Не открывает понравившиеся исполнители ни в папке юзеры, ни в отдельном элементе, прописанным вручную. Интеграция настроена через configuration.yaml. Home Assistant Supervised 2022.3.5, версия компонента 0.0.7.

В логах две ошибки: 1.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/yandex_music_browser/media_browser.py:802
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:45:53 (1 occurrences)
Last logged: 12:45:53

[2707639696] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
  File "/config/custom_components/yandex_music_browser/patches/yandex_station.py", line 148, in _patch_yandex_station_async_browse_media
    response = await _patch_root_async_browse_media(self, media_content_type, media_content_id)
  File "/config/custom_components/yandex_music_browser/patches/_base.py", line 25, in _patch_root_async_browse_media
    response = await (
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 802, in generate_browse_from_media
    del self._response_cache[cache_key]
KeyError: ('library', '3')

2.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/yandex_music_browser/media_browser.py:1542
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22 марта 2022 г., 18:04:54 (6 occurrences)
Last logged: 12:26:51

[2723201280] Error handling message: Unknown error
[2778459248] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
  File "/config/custom_components/yandex_music_browser/patches/yandex_station.py", line 148, in _patch_yandex_station_async_browse_media
    response = await _patch_root_async_browse_media(self, media_content_type, media_content_id)
  File "/config/custom_components/yandex_music_browser/patches/_base.py", line 25, in _patch_root_async_browse_media
    response = await (
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 780, in generate_browse_from_media
    browse_object = processor(self, media_object, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 1100, in wrapped_function
    browse_object = func(browser, media_object, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 1431, in media_link_processor
    return browse_generator(browser, media_content_id, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 920, in wrapped_function
    browse_object = func(browser, media_content_id, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 969, in wrapped_function
    return func(browser, f"#{user_id}", fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 1019, in wrapped_function
    children = browser.generate_browse_list_from_media_list(
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 825, in generate_browse_list_from_media_list
    browse_object = self.generate_browse_from_media(
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 780, in generate_browse_from_media
    browse_object = processor(self, media_object, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 1100, in wrapped_function
    browse_object = func(browser, media_object, fetch_children)
  File "/config/custom_components/yandex_music_browser/media_browser.py", line 1542, in artist_media_processor
    thumbnail=media_object.cover.uri,
AttributeError: 'NoneType' object has no attribute 'uri'

Вот так выглядит в веб-интерфейсе: Screenshot-2.png

freemlab commented 2 years ago

Такая же ошибка.

theskillz commented 2 years ago

В манифесте забыли указать версию зависимости для яндекс.музыки

eratnik commented 2 years ago

В манифесте забыли указать версию зависимости для яндекс.музыки

В новой версии вижу исправили манифест, а ошибка осталась та же.