forslund / spotify-skill

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

clear solution explanation for authentication #166

Closed Lockeddoor closed 3 years ago

Lockeddoor commented 3 years ago

sorry i am creating as a bug because I couldn't find anywhere to share if you follow that explanation you will fix it firstly we all know when you try to login on mycroft.ai you get a message like invalid client but no worries you don't need to do firstly install spotify skill using that command "install the beta version of the spotify skill", we are using this command otherwise auth.py wont appear and don't try to copy and paste into directory codes are not same as the beta.

  1. go into auth.py file and Change "from spotipy import SpotifyOAuth" to "from spotipy.oauth2 import SpotifyOAuth"
  2. run the command on terminal "pip install -r /opt/mycroft/skills/mycroft-spotify.forslund/requirements.txt" to make sure for spotipy version when you are don't with all these steps time to import account information run the command "python /opt/mycroft/skills/mycroft-spotify.forslund/auth.py" also if you get spotipy library error just run that instead of it "python3 /opt/mycroft/skills/mycroft-spotify.forslund/auth.py" import your client id and secret so you are done just run the Mycroft and enjoy
forslund commented 3 years ago

Hi thanks for the write up!

I think instead of step 2 and 3 you can switch into the mycroft virtual env using source venv-activate.sh in the mycroft-core folder, then the "install beta version of the spotify skill" should have installed the correct spotipy version so you can run

python /opt/mycroft/skills/mycroft-spotify.forslund/auth.py" If that is not the case something is wrong (but I have always been able to use those commands)

Lockeddoor commented 3 years ago

ı couldnt actıvate the env but now ı did and yes you are right it works without 2 and 3 if you use env thank you good work!