forslund / spotify-skill

Mycroft Skill to control spotify using the Spotify Connect API
Apache License 2.0
71 stars 38 forks source link

Error during command "play metal": "An error occurred while processing a request in Spotify Skill" #40

Open M-arcus opened 6 years ago

M-arcus commented 6 years ago
21:42:42.857 - __main__:handle_record_begin:35 - INFO - Begin Recording...
21:42:48.051 - __main__:handle_record_end:40 - INFO - End Recording...
21:42:48.055 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
21:42:50.326 - __main__:handle_utterance:61 - INFO - Utterance: ['play metal']
21:42:50.974 - mycroft.skills.core:wrapper:607 - ERROR - An error occurred while processing a request in Spotify Skill
Traceback (most recent call last):
File "/home/user/Projects/mycroft-core/mycroft/skills/core.py", line 598, in wrapper
handler(message)
File "/opt/mycroft/skills/mycroft-spotify.forslund/__init__.py", line 528, in play_song
self.play_playlist(message)
File "/opt/mycroft/skills/mycroft-spotify.forslund/__init__.py", line 600, in play_playlist
self.start_playlist_playback(dev, self.get_best_playlist(playlist))
File "/opt/mycroft/skills/mycroft-spotify.forslund/__init__.py", line 485, in get_best_playlist
key, confidence = match_one(playlist, self.playlists.keys())
File "/home/user/Projects/mycroft-core/mycroft/util/parse.py", line 56, in match_one
raise ValueError('a list or dict of choices must be provided')
ValueError: a list or dict of choices must be provided
M-arcus commented 6 years ago

Also happens with play next

dmwilsonkc commented 6 years ago

I am also getting the same error:

`~~~~:607 - ERROR - An error occurred while processing a request in Spotify Skill
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/skills/core.py", line 598, in wrapper
handler(message)
File "/opt/mycroft/skills/spotify-skill/__init__.py", line 528, in play_song
self.play_playlist(message)
File "/opt/mycroft/skills/spotify-skill/__init__.py", line 600, in play_playlist
self.start_playlist_playback(dev, self.get_best_playlist(playlist))
~~~~pt/mycroft/skills/spotify-skill/__init__.py", line 485, in get_best_playlist
key, confidence = match_one(playlist, self.playlists.keys())
File "/home/pi/mycroft-core/mycroft/util/parse.py", line 56, in match_one
raise ValueError('a list or dict of choices must be provided')
ValueError: a list or dict of choices must be provided
`

Sorry forslund, I did not see the other open issue #35 with the same error.

forslund commented 6 years ago

No worries.

Feel free to check out the branch bugfix/playlists

Should at least be an improvement at this point.

M-arcus commented 6 years ago

@forslund Thank you, it works better now.

The song choices are quite odd, depending on the transcribed requests. Especially ones with shorter titles.

It also tries to select albums now, instead of specific songs.

forslund commented 6 years ago

I think this is intended functionallity

User says play X

  1. spotify skill checks if there's a playlist matching X
  2. spotify skill checks if there's an album matching X

To play a single track ask it to play the song X by Y

forslund commented 6 years ago

Can you give examples of shorter titles that gives weird results?