forslund / spotify-skill

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

Error occured while processing #69

Closed gabipintea closed 5 years ago

gabipintea commented 5 years ago

Hi! Amazing work, really appreciate it! I used it alot until "error occured while processing a request in Spotify Skill". Picroft, latest image, Pi Model B. ** mycroft-core: 18.8.11 ( dev )


Log Output: 21-33 of 51 ====================================================== mycroft-core 18.8.11 === File "/home/pi/mycroft-core/mycroft/skills/core.py", line 886, in wrapper handler(message)


    result = self.CPS_match_query_phrase(search_phrase)
~~~~s/mycroft-spotify.forslund/__init__.py", line 477, in CPS_match_query_phrase
    confidence, data = self.generic_query(phrase, bonus)
~~~~oft/skills/mycroft-spotify.forslund/__init__.py", line 553, in generic_query
    playlist, conf = self.get_best_playlist(phrase)
~~~~skills/mycroft-spotify.forslund/__init__.py", line 698, in get_best_playlist
    list(self.playlists.keys()))
  File "/home/pi/mycroft-core/mycroft/util/parse.py", line 64, in match_one
    best = (_choices[0], fuzzy_match(query, _choices[0]))
IndexError: list index out of range
History ==============================    Log Output Legend ====== Mic Level ===
 play my heart will go on by celine       skills.log, other
 dion                                     voice.log
 >> An error occurred while processing
    a request in Spotify Skill
 >> I'm not sure how to play my heart                                 --- 61.41
    will go on by celine dion                                      56  *

Also, before that i had a problem form time to time regarding resolving player..a lot of times mycroft respond with "not sure how to play X". I managed to use it with "search X on spotify". 

Tell me if you need anything else for debugging or point me in the right direction. please.

Best regards and keep up the good job!
forslund commented 5 years ago

Thanks for reporting. I think I see the issue here, there are no playlists found so it gets the index error. I'll make sure there's a check here. Thank you.

The second issue: What Spotify player are you using?

gabipintea commented 5 years ago

Thanks for fast answer! Ive been using this skill since ...idk...a long time ago with the spotify web browser and had no issues. After about 3-4 months without Mycroft (because of home moving), I finally managed to find my Pi and install it again. Right now I have no Spotify playlists but everytime worked for me with whatever this skill considered to play and was super fine. Right now I play it by default (selected in home.mycroft.ai, which is btw a brilliant setting) to a Samsung TV Series 7(UE40NU7122) with Official Spotify App installed, but also to another RaspberryPI running a client for Spotify (which also makes me ask, what is the utterance to change the current playback device? I use it mainly with my TV but sometimes I would like to change the device directly with Mycroft. Mycroft responds with the available devices and discover the last one but i can't find a way to move the playback there). I didn't tried to reinstall the skill, for debugging purposes. Maybe it would have fixed it, maybe not. Better to check this bug. Thank you very much for your help!

forslund commented 5 years ago

transfer spotify to should do it.

You also have the "what spotify devices are available" to check which devices the skill can identify.

gabipintea commented 5 years ago

Ok. As soon as it gets fixed I'll try that command. Let me know if I can provide you some more infos on the above problem.

gabipintea commented 5 years ago

How's going? Any luck?

forslund commented 5 years ago

Sorry, I've been down a couple of other (very deep) rabbit holes the last couple days and haven't had time to look at this properly.

Will try to get something before the weekend.

forslund commented 5 years ago

I pushed bugfix/check_playlist branch and opened PR #71 if you like to try you should be able to switch branch.

gabipintea commented 5 years ago

Hi! Finally working! Thank you very much! Transfer spotify to ... works also as intended. Just sometimes mycroft cannot resolve the player in the playback control skill. It answers with something like, I don't know how to play X.... Besides that everything is fine and I want to thank you again and keep up the good work!

forslund commented 5 years ago

Excellent, I've merged the branch and will close this issue. We're doing some additional work on this skill so hopefully it'll be better shortly.