Giter Club home page Giter Club logo

Comments (14)

jjlawren avatar jjlawren commented on July 17, 2024 2

@Fatalmose this should be resolved after 2024.6.4 is released and you upgrade to that version.

from core.

Boromore avatar Boromore commented on July 17, 2024 1

I'm having the same problem and I'm also using core 2024.6.1.
The same is also the case for core 2024.6.0.
Hereafter the log concerning the issue:

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 1308, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sonos/media_player.py", line 776, in async_browse_media
return await media_browser.async_browse_media(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sonos/media_browser.py", line 115, in async_browse_media
return await spotify.async_browse_media(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/spotify/browse_media.py", line 181, in async_browse_media
or not isinstance(entry.runtime_data, HomeAssistantSpotifyData)
^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'HomeAssistantSpotifyData' is not defined

from core.

mib1185 avatar mib1185 commented on July 17, 2024 1

Please use the 👍 reaction on the inital post, instead of these "same here" comments, thx 👍

i'm on a business trip this week, so i can check it earliest the week after

from core.

jjlawren avatar jjlawren commented on July 17, 2024 1

This looks like it's caused by #117037 where the import of HomeAssistantSpotifyData was moved behind an if TYPE_CHECKING guard. However it can't be simply imported because that would lead to a circular import.

Created #119747 as a workaround for this, but I do not have a Spotify account so I was unable to fully test the fix.

from core.

home-assistant avatar home-assistant commented on July 17, 2024

Hey there @frenck, @joostlek, mind taking a look at this issue as it has been labeled with an integration (spotify) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of spotify can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign spotify Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


spotify documentation
spotify source
(message by IssueLinks)

from core.

molchreis avatar molchreis commented on July 17, 2024

same issue here. Added the integration today.

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 1308, in websocket_browse_media payload = await player.async_browse_media(media_content_type, media_content_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sonos/media_player.py", line 776, in async_browse_media return await media_browser.async_browse_media( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sonos/media_browser.py", line 115, in async_browse_media return await spotify.async_browse_media( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/spotify/browse_media.py", line 181, in async_browse_media or not isinstance(entry.runtime_data, HomeAssistantSpotifyData) ^^^^^^^^^^^^^^^^^^^^^^^^ NameError: name 'HomeAssistantSpotifyData' is not defined

furthermore I did not find /usr/src/homeassistant/homeassistant/components/spotify/browse_media.py

from core.

joostlek avatar joostlek commented on July 17, 2024

cc @mib1185

from core.

Nohchiyco avatar Nohchiyco commented on July 17, 2024

Same issue after update to 2024.6.1.

from core.

N3m3515 avatar N3m3515 commented on July 17, 2024

i have the same problem with 2024.6.2

from core.

Fatalmose avatar Fatalmose commented on July 17, 2024

Same problem for me.
Since the newest update an unknown error shows up…

from core.

pjh68 avatar pjh68 commented on July 17, 2024

Looks like this was caused by #118106
Changing to PEP 695 type alias breaks the isinstance check in

or not isinstance(entry.runtime_data, HomeAssistantSpotifyData)

(hope this helps... I can read enough python to see where the problem is, but don't know enough to know what the fix should be, bar reverting the change).

from core.

Fatalmose avatar Fatalmose commented on July 17, 2024

from core.

Fatalmose avatar Fatalmose commented on July 17, 2024

from core.

Fatalmose avatar Fatalmose commented on July 17, 2024

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.