dupontgu / retro-ipod-spotify-client

The software that powers the sPot: a 4th generation "Click Wheel" iPod with a full Spotify client.
Apache License 2.0
893 stars 90 forks source link

Having Problems with Spotipy... #12

Open HeartWaker000 opened 3 years ago

HeartWaker000 commented 3 years ago

For whatever reason when I run python3 spotifypod.py I get the error: No module named 'spotipy'

I was able to run spotifypod.py before and was even able to get spotify to recognize everything but for some reason now the spotipy module wont show up.

I am super confused and also fairly new to this so forgive my ignorance.

Thanks

rsappia commented 3 years ago

@HeartWaker000 did you try with python instead python3?

HeartWaker000 commented 3 years ago

Yes I tried with python and python3. It seems like half the time I can get it to recognize spotipy and for whatever reason it just stops. I even wrote out the sample python script from spotipy, was able to get my list of songs then tried running the same script again and it returned the same error: No module named 'spotipy'

I don't know if I installed some things wrong in a bad order or what, but I am starting from scratch trying everything over again.

chonnymon commented 3 years ago

@HeartWaker000 I remember running into that problem, are you SSHing into the Pi, I started doing that but found everything worked better when I plugged a monitor in and worked from the Pi

HeartWaker000 commented 3 years ago

So I was sshing into the pi, but I started all over with a monitor and think I have everything going ok.

Now my problem is when I fire up my piZero I get a blank screen. I then ssh into the piZero and get two notices...

xset: unable to open display"" xset: unable to open display""

I think its because I have everything set up to work off the gpio and I don't have that part of the project set up yet.
I am not very knowledgeable on these things, but could anyone point me toward knowledge on how to point the raspi to recognize my HDMI so I can see if they gui is working?

Again, sorry for the ignorance, this is my first project like this.

HeartWaker000 commented 3 years ago

I think this can be closed. I have resolved my issues. Thanks for all the great info.

now to get the clickwheel and screen going

mattkerrison commented 3 years ago

@HeartWaker000 What was the resolution for the display?

HeartWaker000 commented 3 years ago

1920x1080 for the resolution.

mattkerrison commented 3 years ago

1920x1080 for the resolution.

Sorry I meant the resolution of the issue with the display you were having

HeartWaker000 commented 3 years ago

Aaaah ha! So, apparently from reading other problems, the blank screen looks like it was due to the pi booting into Openbox and then running into errors before it could fully load spotifypod.py. I had taken out the '- nocursor' argument in .bash_profile and it gave me cursor on that black screen the next time I rebooted. I right-clicked on the screen was able to open a terminal and try to run python3 spotifypod.py again from there.

I was able to load the sPot at that point but it was giving me a tonne of errors, most specifically 401 Spotify api errors.

After reading through the issues I thought I had it figured it out so I made a fresh install on a new sd card and got to the point where I was loading spotifypod.py from the openbox terminal and this time I received a tkinter error for a reason unknown to me.

this was the most recent error:

File "spotifypod.py", line 13, in from PIL import ImageTK, Image ImportError: cannot import name 'ImageTK' from 'PIL' (/usr/lib/python3/dist-packages/PIL/init.py)

I think I must be installing some things in the wrong places or something. This is my first time using Linux in 20 or so years so I'm a bit foggy on some things. Any guidance as to what I may be doing wrong would be awesome.

sebakitzing commented 3 years ago

Aaaah ha! So, apparently from reading other problems, the blank screen looks like it was due to the pi booting into Openbox and then running into errors before it could fully load spotifypod.py. I had taken out the '- nocursor' argument in .bash_profile and it gave me cursor on that black screen the next time I rebooted. I right-clicked on the screen was able to open a terminal and try to run python3 spotifypod.py again from there.

I was able to load the sPot at that point but it was giving me a tonne of errors, most specifically 401 Spotify api errors.

After reading through the issues I thought I had it figured it out so I made a fresh install on a new sd card and got to the point where I was loading spotifypod.py from the openbox terminal and this time I received a tkinter error for a reason unknown to me.

this was the most recent error:

File "spotifypod.py", line 13, in from PIL import ImageTK, Image ImportError: cannot import name 'ImageTK' from 'PIL' (/usr/lib/python3/dist-packages/PIL/init.py)

I think I must be installing some things in the wrong places or something. This is my first time using Linux in 20 or so years so I'm a bit foggy on some things. Any guidance as to what I may be doing wrong would be awesome.

I'm having the same problem as you were having, but I do not understand how you fixed it... Can you show me the way?

illteteka commented 3 years ago

I'm having the same problem as you were having, but I do not understand how you fixed it... Can you show me the way?

I fixed this by installing this sudo apt-get install python3-pil python3-pil.imagetk