pimoroni / pidi-spotify

MIT License
47 stars 12 forks source link

pidi-spotify not working on a raspberry pi zero #7

Open azrael783 opened 3 years ago

azrael783 commented 3 years ago

I tried to install pidi-spotify on my raspberry pi zero wh but it doesn't start correctly. I'm getting this error message:

Nov 08 18:59:42 spotipi systemd[1]: Started PiDi Spotify Service.
Nov 08 18:59:42 spotipi sudo[952]: pam_unix(sudo:session): session closed for user root
Nov 08 18:59:45 spotipi sudo[956]:       pi : TTY=pts/0 ; PWD=/home/pi/pidi-spotify ; USER=root ; COMMAND=/bin/journalctl -f
Nov 08 18:59:45 spotipi sudo[956]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Nov 08 18:59:46 spotipi pidi_spotify[955]: Traceback (most recent call last):
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/local/bin/pidi_spotify", line 6, in <module>
Nov 08 18:59:46 spotipi pidi_spotify[955]:     from pkg_resources import load_entry_point
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3191, in <module>
Nov 08 18:59:46 spotipi pidi_spotify[955]:     @_call_aside
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
Nov 08 18:59:46 spotipi pidi_spotify[955]:     f(*args, **kwargs)
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
Nov 08 18:59:46 spotipi pidi_spotify[955]:     working_set = WorkingSet._build_master()
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
Nov 08 18:59:46 spotipi pidi_spotify[955]:     ws.require(__requires__)
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 900, in require
Nov 08 18:59:46 spotipi pidi_spotify[955]:     needed = self.resolve(parse_requirements(requirements))
Nov 08 18:59:46 spotipi pidi_spotify[955]:   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 786, in resolve
Nov 08 18:59:46 spotipi pidi_spotify[955]:     raise DistributionNotFound(req, requirers)
Nov 08 18:59:46 spotipi pidi_spotify[955]: pkg_resources.DistributionNotFound: The 'Pillow' distribution was not found and is required by pidi-display-st7789, pidi-display-pil
Nov 08 18:59:46 spotipi systemd[1]: pidi-spotify.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 18:59:46 spotipi systemd[1]: pidi-spotify.service: Failed with result 'exit-code'.
Nov 08 18:59:46 spotipi systemd[1]: pidi-spotify.service: Service RestartSec=100ms expired, scheduling restart.
Nov 08 18:59:46 spotipi systemd[1]: pidi-spotify.service: Scheduled restart job, restart counter is at 1.
Nov 08 18:59:46 spotipi systemd[1]: Stopped PiDi Spotify Service.

I tried to reinstall pidi-spotify but got error messages (see: install-log.txt). After that I installed Pillow, fonts and font_roboto myself successful but pidi-spotify still doesn't run and I get the same error message than before.

Gadgetoid commented 3 years ago

Have you tried: sudo apt install python3-pil?

SgtTacooo commented 3 years ago

Have you tried: sudo apt install python3-pil?

I ran this and finally got it to get past the initial error message but now I've got another one.

The 'fonts' distribution was not found and is required by pidi-display-pil.

I can't for the life of me figure out what the command is to get the fonts package and no amount of googling is giving me an answer.

azrael783 commented 3 years ago

Sorry for my late answer. I started today with a fresh install on newly setup Pi zero. I installed every package which is mentioned here and also the ones which are mentioned to be used for mopidy. PiDi_spotify is now running but I do not see any picture on the screen. I see only a small "play" symbol and the "loudness bar".

N14BO commented 3 years ago

I am sadly in the same case... have you found any solution?

azrael783 commented 3 years ago

No unfortunately not :-(

azrael783 commented 3 years ago

I use now volumio and the addon for pirate audio. This works for me.

KSuondProject commented 3 years ago

Hi, I'm in the same situation. It seems there's a problem with a os.environ in the hook.py file. It doesn't found the EVENT_PLAYER in os.environ of the raspberry OS. But i'm not a champ with python and I don't know hot to solve it. I trying to find info in librespot (raspotify) because i think that is there this "PLAYER_EVENT" that handle the event change (song change, play track, stop track, ecc). I don't think that's a hard correction, maybe someone can do this not only the developer. Hope in some update soon...