Spotify extension not working?

Apologies in advance, this is a bit of a long post, to say the least.

Running as a service
Raspi 4 - Raspbian GNU/Linux 10 (buster)

Upon system startup:

pi@pi4:~ $ sudo systemctl status mopidy
● mopidy.service - Mopidy music server
Loaded: loaded (/lib/systemd/system/mopidy.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-17 21:08:00 MST; 5min ago
Process: 514 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
Process: 521 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
Main PID: 525 (mopidy)
Tasks: 10 (limit: 4915)
CGroup: /system.slice/mopidy.service
└─525 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy.commands Starting Mopidy audio
Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy.commands Starting Mopidy core
Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend, IrisFrontend
Jan 17 21:08:05 pi4 mopidy[525]: ERROR [MainThread] mopidy.commands Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Err
Jan 17 21:08:05 pi4 mopidy[525]: INFO [MainThread] mopidy_mpd.actor MPD server running at [::ffff:127.0.0.1]:6600
Jan 17 21:08:05 pi4 mopidy[525]: INFO [Audio-2] mopidy.audio.actor Audio output set to “autoaudiosink”

pi@pi4:~ sudo service mopidy restart pi@pi4:~ sudo systemctl status mopidy
● mopidy.service - Mopidy music server
Loaded: loaded (/lib/systemd/system/mopidy.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-17 21:13:47 MST; 5s ago
Process: 1096 ExecStartPre=/bin/mkdir -p /var/cache/mopidy (code=exited, status=0/SUCCESS)
Process: 1097 ExecStartPre=/bin/chown mopidy:audio /var/cache/mopidy (code=exited, status=0/SUCCESS)
Main PID: 1098 (mopidy)
Tasks: 12 (limit: 4915)
CGroup: /system.slice/mopidy.service
└─1098 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf

Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy.commands Starting Mopidy audio
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [Audio-2] mopidy.audio.actor Audio output set to “autoaudiosink”
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy.commands Starting Mopidy core
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend, IrisFrontend
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [HttpFrontend-8] mopidy.http.actor HTTP server running at [::ffff:192.168.1.80]:6680
Jan 17 21:13:49 pi4 mopidy[1098]: INFO [MainThread] mopidy_mpd.actor MPD server running at [::ffff:127.0.0.1]:6600

pi@pi4:~ $ journalctl -u mopidy
– Logs begin at Sun 2021-01-17 21:07:55 MST, end at Sun 2021-01-17 21:14:31 MST. –
Jan 17 21:08:00 pi4 systemd[1]: Starting Mopidy music server…
Jan 17 21:08:00 pi4 systemd[1]: Started Mopidy music server.
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.main Starting Mopidy 3.1.1
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.config Loading config from builtin defaults
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.config Loading config from command line options
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.main Enabled extensions: iris, http, spotify, file, m3u, mpd, softwaremixer, stream
Jan 17 21:08:04 pi4 mopidy[525]: INFO [MainThread] mopidy.main Disabled extensions: none
Jan 17 21:08:05 pi4 mopidy[525]: ERROR [MainThread] mopidy.main Extension spotify failed during setup. This might have left the registry in a
Jan 17 21:08:05 pi4 mopidy[525]: Traceback (most recent call last):
Jan 17 21:08:05 pi4 mopidy[525]: File “/usr/local/lib/python3.7/dist-packages/mopidy/main.py”, line 129, in main
Jan 17 21:08:05 pi4 mopidy[525]: extension.setup(registry)
Jan 17 21:08:05 pi4 mopidy[525]: File “/usr/lib/python3/dist-packages/mopidy_spotify/init.py”, line 49, in setup
Jan 17 21:08:05 pi4 mopidy[525]: from mopidy_spotify.backend import SpotifyBackend
Jan 17 21:08:05 pi4 mopidy[525]: File “/usr/lib/python3/dist-packages/mopidy_spotify/backend.py”, line 9, in
Jan 17 21:08:05 pi4 mopidy[525]: from mopidy_spotify import Extension, library, playback, playlists, web

pi@pi4:~ mopidy -vvv INFO 2021-01-17 21:15:34,973 [1185:MainThread] mopidy.__main__ Starting Mopidy 3.1.1 DEBUG 2021-01-17 21:15:34,987 [1185:MainThread] mopidy.ext Loading entry point: file = mopidy.file:Extension DEBUG 2021-01-17 21:15:34,989 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-File 3.1.1 DEBUG 2021-01-17 21:15:34,989 [1185:MainThread] mopidy.ext Loading entry point: http = mopidy.http:Extension DEBUG 2021-01-17 21:15:34,990 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-HTTP 3.1.1 DEBUG 2021-01-17 21:15:34,990 [1185:MainThread] mopidy.ext Loading entry point: m3u = mopidy.m3u:Extension DEBUG 2021-01-17 21:15:34,991 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-M3U 3.1.1 DEBUG 2021-01-17 21:15:34,991 [1185:MainThread] mopidy.ext Loading entry point: softwaremixer = mopidy.softwaremixer:Extension DEBUG 2021-01-17 21:15:34,992 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-SoftwareMixer 3.1.1 DEBUG 2021-01-17 21:15:34,992 [1185:MainThread] mopidy.ext Loading entry point: stream = mopidy.stream:Extension DEBUG 2021-01-17 21:15:34,993 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-Stream 3.1.1 DEBUG 2021-01-17 21:15:34,993 [1185:MainThread] mopidy.ext Loading entry point: mpd = mopidy_mpd:Extension DEBUG 2021-01-17 21:15:34,997 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-MPD 3.1.0 DEBUG 2021-01-17 21:15:34,997 [1185:MainThread] mopidy.ext Loading entry point: iris = mopidy_iris:Extension DEBUG 2021-01-17 21:15:34,999 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-Iris 3.55.4 DEBUG 2021-01-17 21:15:35,010 [1185:MainThread] mopidy.ext Loading entry point: spotify = mopidy_spotify:Extension DEBUG 2021-01-17 21:15:35,012 [1185:MainThread] mopidy.ext Loaded extension: Mopidy-Spotify 4.1.0 DEBUG 2021-01-17 21:15:35,021 [1185:MainThread] mopidy.ext Discovered extensions: file, http, m3u, softwaremixer, stream, mpd, iris, spotify DEBUG 2021-01-17 21:15:35,027 [1185:MainThread] mopidy.config.keyring Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.secrets service not running) INFO 2021-01-17 21:15:35,028 [1185:MainThread] mopidy.config Loading config from builtin defaults DEBUG 2021-01-17 21:15:35,031 [1185:MainThread] mopidy.config Loading config from file:///etc/xdg/mopidy/mopidy.conf failed; it does not exist INFO 2021-01-17 21:15:35,032 [1185:MainThread] mopidy.config Loading config from file:///home/pi/.config/mopidy/mopidy.conf INFO 2021-01-17 21:15:35,035 [1185:MainThread] mopidy.config Loading config from command line options WARNING 2021-01-17 21:15:35,044 [1185:MainThread] mopidy.config Ignoring config section 'local' because no matching extension was found DEBUG 2021-01-17 21:15:35,049 [1185:MainThread] mopidy.ext Validating extension: file DEBUG 2021-01-17 21:15:35,224 [1185:MainThread] mopidy.ext Validating extension: http DEBUG 2021-01-17 21:15:35,379 [1185:MainThread] mopidy.ext Validating extension: m3u DEBUG 2021-01-17 21:15:35,381 [1185:MainThread] mopidy.ext Validating extension: softwaremixer DEBUG 2021-01-17 21:15:35,383 [1185:MainThread] mopidy.ext Validating extension: stream DEBUG 2021-01-17 21:15:35,385 [1185:MainThread] mopidy.ext Validating extension: mpd DEBUG 2021-01-17 21:15:35,479 [1185:MainThread] mopidy.ext Validating extension: iris DEBUG 2021-01-17 21:15:35,543 [1185:MainThread] mopidy.ext Validating extension: spotify INFO 2021-01-17 21:15:35,565 [1185:MainThread] mopidy.__main__ Enabled extensions: stream, iris, mpd, file, softwaremixer, m3u, http INFO 2021-01-17 21:15:35,566 [1185:MainThread] mopidy.__main__ Disabled extensions: spotify WARNING 2021-01-17 21:15:35,566 [1185:MainThread] mopidy.__main__ Found spotify configuration errors. The extension has been automatically disabled: WARNING 2021-01-17 21:15:35,566 [1185:MainThread] mopidy.__main__ spotify/username must be set. WARNING 2021-01-17 21:15:35,566 [1185:MainThread] mopidy.__main__ spotify/password must be set. WARNING 2021-01-17 21:15:35,566 [1185:MainThread] mopidy.__main__ spotify/client_id must be set. WARNING 2021-01-17 21:15:35,567 [1185:MainThread] mopidy.__main__ spotify/client_secret must be set. WARNING 2021-01-17 21:15:35,567 [1185:MainThread] mopidy.__main__ Please fix the extension configuration errors or disable the extensions to silence these messages. DEBUG 2021-01-17 21:15:35,896 [1185:MainThread] mopidy.commands Available Mopidy mixers: SoftwareMixer INFO 2021-01-17 21:15:35,897 [1185:MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer DEBUG 2021-01-17 21:15:35,898 [1185:MainThread] pykka Registered SoftwareMixer (urn:uuid:6b64d720-8fe3-44f8-b7f4-b9d48c7be472) DEBUG 2021-01-17 21:15:35,898 [1185:MainThread] pykka Starting SoftwareMixer (urn:uuid:6b64d720-8fe3-44f8-b7f4-b9d48c7be472) DEBUG 2021-01-17 21:15:35,901 [1185:MainThread] mopidy.commands Mixer volume left unchanged INFO 2021-01-17 21:15:35,901 [1185:MainThread] mopidy.commands Starting Mopidy audio DEBUG 2021-01-17 21:15:35,902 [1185:MainThread] pykka Registered Audio (urn:uuid:017b4dbc-1379-45fc-a109-c2b69699ce9b) DEBUG 2021-01-17 21:15:35,903 [1185:MainThread] pykka Starting Audio (urn:uuid:017b4dbc-1379-45fc-a109-c2b69699ce9b) INFO 2021-01-17 21:15:35,906 [1185:MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend DEBUG 2021-01-17 21:15:35,908 [1185:MainThread] pykka Registered FileBackend (urn:uuid:d3ecc3cb-c499-4836-aeb4-5fdf8b1f3809) DEBUG 2021-01-17 21:15:35,909 [1185:MainThread] pykka Starting FileBackend (urn:uuid:d3ecc3cb-c499-4836-aeb4-5fdf8b1f3809) DEBUG 2021-01-17 21:15:35,921 [1185:MainThread] pykka Registered M3UBackend (urn:uuid:f8d51f39-46a3-4d5f-9e39-128f8d1a230f) DEBUG 2021-01-17 21:15:35,922 [1185:MainThread] pykka Starting M3UBackend (urn:uuid:f8d51f39-46a3-4d5f-9e39-128f8d1a230f) INFO 2021-01-17 21:15:35,933 [1185:Audio-2] mopidy.audio.actor Audio output set to "autoaudiosink" DEBUG 2021-01-17 21:15:35,945 [1185:MainThread] pykka Registered StreamBackend (urn:uuid:08e88e4b-ab9d-4eae-8ed0-d3545accf8b4) DEBUG 2021-01-17 21:15:35,945 [1185:MainThread] pykka Starting StreamBackend (urn:uuid:08e88e4b-ab9d-4eae-8ed0-d3545accf8b4) INFO 2021-01-17 21:15:35,952 [1185:MainThread] mopidy.commands Starting Mopidy core DEBUG 2021-01-17 21:15:35,961 [1185:MainThread] pykka Registered Core (urn:uuid:0d330fd1-2a22-45a5-bade-b1ee47035d00) DEBUG 2021-01-17 21:15:35,961 [1185:MainThread] pykka Starting Core (urn:uuid:0d330fd1-2a22-45a5-bade-b1ee47035d00) INFO 2021-01-17 21:15:35,970 [1185:MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend, IrisFrontend DEBUG 2021-01-17 21:15:35,971 [1185:MainThread] mopidy.http.actor Starting HTTP server DEBUG 2021-01-17 21:15:35,972 [1185:MainThread] pykka Registered HttpFrontend (urn:uuid:1fc5641a-a980-4ea0-8dd8-8e6489bd8ea5) DEBUG 2021-01-17 21:15:35,972 [1185:MainThread] pykka Starting HttpFrontend (urn:uuid:1fc5641a-a980-4ea0-8dd8-8e6489bd8ea5) INFO 2021-01-17 21:15:35,973 [1185:HttpFrontend-8] mopidy.http.actor HTTP server running at [::ffff:127.0.0.1]:6680 ERROR 2021-01-17 21:15:35,974 [1185:MainThread] mopidy.commands Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use DEBUG 2021-01-17 21:15:35,975 [1185:HttpServer] asyncio Using selector: EpollSelector DEBUG 2021-01-17 21:15:35,976 [1185:MainThread] pykka Registered IrisFrontend (urn:uuid:ce8f8ff2-d450-473c-90ce-4cafd003ff7b) DEBUG 2021-01-17 21:15:35,978 [1185:MainThread] pykka Starting IrisFrontend (urn:uuid:ce8f8ff2-d450-473c-90ce-4cafd003ff7b) DEBUG 2021-01-17 21:15:35,979 [1185:HttpServer] mopidy.http.actor Loaded HTTP extension: mopidy INFO 2021-01-17 21:15:35,982 [1185:IrisFrontend-9] mopidy_iris.core Starting Iris 3.55.4 INFO 2021-01-17 21:15:35,982 [1185:MainThread] mopidy.commands Starting GLib mainloop DEBUG 2021-01-17 21:15:35,984 [1185:HttpServer] mopidy.http.actor Loaded HTTP extension: iris DEBUG 2021-01-17 21:15:35,988 [1185:HttpServer] mopidy.http.actor Default webclient is mopidy DEBUG 2021-01-17 21:15:35,991 [1185:HttpServer] mopidy.http.actor HTTP routes from extensions: '/mopidy': <class 'mopidy.http.handlers.AddSlashHandler'> '/mopidy/ws/?': <class 'mopidy.http.handlers.WebSocketHandler'> '/mopidy/rpc': <class 'mopidy.http.handlers.JsonRpcHandler'> '/mopidy/(.+)': <class 'mopidy.http.handlers.StaticFileHandler'> '/mopidy/': <class 'mopidy.http.handlers.ClientListHandler'> '/iris': <class 'mopidy.http.handlers.AddSlashHandler'> '/iris/http/([^/]*)': <class 'mopidy_iris.handlers.HttpHandler'> '/iris/ws/?': <class 'mopidy_iris.handlers.WebsocketHandler'> '/iris/assets/(.*)': <class 'tornado.web.StaticFileHandler'> '/iris/((.*)(?:css|js|json|map))’: <class ‘tornado.web.StaticFileHandler’>
‘/iris/(.*)’: <class ‘mopidy_iris.handlers.ReactRouterHandler’>
‘/’: <class ‘tornado.web.RedirectHandler’>
DEBUG 2021-01-17 21:15:35,996 [1185:HttpFrontend-8] mopidy.zeroconf
Zeroconf service ‘Mopidy HTTP server on pi4’ (_http._tcp at []:6680): Published
DEBUG 2021-01-17 21:15:36,007 [1185:HttpFrontend-8] mopidy.zeroconf
Zeroconf service ‘Mopidy HTTP server on pi4’ (_mopidy-http._tcp at []:6680): Published

Config snippet

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[file]
entire config not shown - not using file at this time

[http]
enabled = true
hostname = REDACTED
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[spotify]
enabled = true
username = REDACTED
password = REDACTED
client_id = REDACTED
client_secret = REDACTED
bitrate = 160
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

pi@pi4:~ $ mopidy deps
WARNING 2021-01-18 08:49:24,401 [1995:MainThread] mopidy.config
Ignoring config section ‘local’ because no matching extension was found
Executable: /usr/local/bin/mopidy
Platform: Linux-5.4.83-v7l±armv7l-with-debian-10.7
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
tornado: 5.1.1 from /usr/lib/python3/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.1.0 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Mopidy-Iris: 3.55.4 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Mopidy-Spotify: 4.1.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad

That’s a heck of a lot of text. Funny enough, my login and password are correct, and I’ve tried a new authentication with no luck.

I can access the Iris GUI and can see my playlists, no problem there.
When tying to play tracks from the browser it gives an error - Mopidy failed to add some tracks.
Cannot search tracks using search…
Debug window - Load Queue just keeps saying Loading Nothing…
I can see new playlists that aren’t saved to my account, and can see the tracks within them, but can’t play them.
If I do select Play, it appears to play (silence) for 4-5 seconds.

Settings - Server - Shows as connected

  • Services - Spotify shows as Authorized

I swear I’m not doing this to bug the mods :slight_smile:

Thanks!

Please decide if you are trying to run Mopidy as a service or not. This mixture of both methods is not helpful, if nothing else it’s made this post twice longer for no benefit.

There’s an error happening here. I can’t see exactly what because the lines have been truncated. Can you post the full lines?

Also provide sudo mopidyctl deps and sudo mopidyctl config.

And I am genuinely curious as I am trying to make this process easier for everyone: was the forum post template not clear or not obvious enough or too many words?

The template was clear, I just wanted to post as much as I could track down in hopes it would help.
I’m clearly new to this and it is taking a bit to pick it up.
Don’t know why the lines got truncated. Hope this helps.
Thank you again for your time.

pi@pi4:~ $ journalctl -u mopidy
Jan 17 21:48:10 pi4 systemd[1]: Starting Mopidy music server…
Jan 17 21:48:11 pi4 systemd[1]: Started Mopidy music server.
Jan 17 21:48:14 pi4 mopidy[511]: INFO [MainThread] mopidy.main Starting Mopidy 3.1.1
Jan 17 21:48:14 pi4 mopidy[511]: INFO [MainThread] mopidy.config Loading config from builtin defaults
Jan 17 21:48:14 pi4 mopidy[511]: INFO [MainThread] mopidy.config Loading config from file:///usr/share/mopidy/conf.d/mopidy.conf
Jan 17 21:48:14 pi4 mopidy[511]: INFO [MainThread] mopidy.config Loading config from file:///etc/mopidy/mopidy.conf
Jan 17 21:48:14 pi4 mopidy[511]: INFO [MainThread] mopidy.config Loading config from command line options
Jan 17 21:48:15 pi4 mopidy[511]: INFO [MainThread] mopidy.main Enabled extensions: file, http, spotify, iris, stream, m3u, softwaremixer, mpd
Jan 17 21:48:15 pi4 mopidy[511]: INFO [MainThread] mopidy.main Disabled extensions: none
Jan 17 21:48:16 pi4 mopidy[511]: ERROR [MainThread] mopidy.main Extension spotify failed during setup. This might have left the registry in a bad state.
Jan 17 21:48:16 pi4 mopidy[511]: Traceback (most recent call last):
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/local/lib/python3.7/dist-packages/mopidy/main.py”, line 129, in main
Jan 17 21:48:16 pi4 mopidy[511]: extension.setup(registry)
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/init.py”, line 49, in setup
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify.backend import SpotifyBackend
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/backend.py”, line 9, in
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify import Extension, library, playback, playlists, web
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/library.py”, line 5, in
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify import browse, distinct, images, lookup, search
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/browse.py”, line 39, in
Jan 17 21:48:16 pi4 mopidy[511]: “albums”: spotify.ToplistType.ALBUMS,
Jan 17 21:48:16 pi4 mopidy[511]: AttributeError: module ‘spotify’ has no attribute ‘ToplistType’
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting Mopidy mixer: SoftwareMixer
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting Mopidy audio
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting Mopidy core
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting Mopidy frontends: HttpFrontend, MpdFrontend, IrisFrontend
Jan 17 21:48:16 pi4 mopidy[511]: ERROR [MainThread] mopidy.commands Frontend (HttpFrontend) initialization error: HTTP server startup failed: [Errno 99] Cannot assig
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy_mpd.actor MPD server running at [::ffff:127.0.0.1]:6600
Jan 17 21:48:16 pi4 mopidy[511]: INFO [IrisFrontend-8] mopidy_iris.core Starting Iris 3.55.4
Jan 17 21:48:16 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Starting GLib mainloop
Jan 17 21:48:16 pi4 mopidy[511]: INFO [Audio-2] mopidy.audio.actor Audio output set to “autoaudiosink”
Jan 18 11:17:00 pi4 mopidy[511]: INFO [MainThread] mopidy.commands GLib mainloop got SIGTERM. Exiting…
Jan 18 11:17:00 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Stopping Mopidy frontends
Jan 18 11:17:00 pi4 systemd[1]: Stopping Mopidy music server…
Jan 18 11:17:00 pi4 mopidy[511]: INFO [IrisFrontend-8] mopidy_iris.core Stopping Iris
Jan 18 11:17:00 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Stopping Mopidy core
Jan 18 11:17:00 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Stopping Mopidy backends
Jan 18 11:17:00 pi4 mopidy[511]: INFO [MainThread] mopidy.commands Stopping Mopidy audio

pi@pi4:~ $ sudo mopidyctl deps
Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps” as user mopidy
Executable: /usr/bin/mopidy
Platform: Linux-5.4.83-v7l±armv7l-with-debian-10.7
Python: CPython 3.7.3 from /usr/lib/python3.7
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
tornado: 5.1.1 from /usr/lib/python3/dist-packages
requests: 2.21.0 from /usr/lib/python3/dist-packages
Mopidy-MPD: 3.1.0 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Mopidy-Iris: 3.55.4 from /usr/local/lib/python3.7/dist-packages
Pykka: 2.0.3 from /usr/local/lib/python3.7/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
setuptools: 40.8.0 from /usr/lib/python3/dist-packages
Mopidy: 3.1.1 from /usr/local/lib/python3.7/dist-packages
Mopidy-Spotify: 4.1.0 from /usr/lib/python3/dist-packages
GStreamer: 1.14.4.0 from /usr/lib/python3/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.30.4
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec
mad

pi@pi4:~ $ sudo mopidyctl config
Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config” as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s [%(threadName)s] %(name)s %(message)s
color = false
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = 192.168.1.80
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[iris]
enabled = true
country = CA
locale = en_CA
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
lastfm_authorization_url = https://jamesbarnsley.co.nz/iris/auth_lastfm.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris

[spotify]
enabled = true
username = **********
password = ********
client_id = 59223610-34f2-48c0-bbb3-67f366008caa
client_secret = ********
bitrate = 160
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

Interesting! This is a new one.

Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/**init**.py”, line 49, in setup
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify.backend import SpotifyBackend
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/backend.py”, line 9, in
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify import Extension, library, playback, playlists, web
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/library.py”, line 5, in
Jan 17 21:48:16 pi4 mopidy[511]: from mopidy_spotify import browse, distinct, images, lookup, search
Jan 17 21:48:16 pi4 mopidy[511]: File “/usr/lib/python3/dist-packages/mopidy_spotify/browse.py”, line 39, in
Jan 17 21:48:16 pi4 mopidy[511]: “albums”: spotify.ToplistType.ALBUMS,
Jan 17 21:48:16 pi4 mopidy[511]: AttributeError: module ‘spotify’ has no attribute ‘ToplistType’

First guess is that the pyspotify installation is somehow broken. But it looks like you installed Mopidy-Spotify from APT (correct?) so I’m not sure how it could be broken… Can you try running this:

python3 -c "import spotify; print(spotify); print(spotify.__version__); print(dir(spotify))"

And thanks for the feedback about the template, it’s a new addition to the forum so trying to see how to improve it.

  • I believe I installed Mopidy-Spotify via APT, yes.
    The post template was great. I’m just not the best at this computer stuff :slight_smile:

Here’s what it came back with:
$ python3 -c “import spotify; print(spotify); print(spotify.version); print(dir(spotify))”
<module ‘spotify’ from ‘/usr/local/lib/python3.7/dist-packages/spotify/init.py’>
0.10.2
[‘Album’, ‘Any’, ‘Artist’, ‘Callable’, ‘Client’, ‘Context’, ‘Device’, ‘Dict’, ‘Forbidden’, ‘HTTPClient’, ‘HTTPException’, ‘HTTPUserClient’, ‘Image’, ‘Iterable’, ‘Library’, ‘NotFound’, ‘OAuth2’, ‘Optional’, ‘Player’, ‘Playlist’, ‘PlaylistTrack’, ‘SearchResults’, ‘Set’, ‘SpotifyBase’, ‘SpotifyException’, ‘Track’, ‘Tuple’, ‘Type’, ‘Union’, ‘User’, ‘VALID_SCOPES’, ‘all’, ‘annotations’, ‘author’, ‘builtins’, ‘cached’, ‘doc’, ‘file’, ‘license’, ‘loader’, ‘name’, ‘package’, ‘path’, ‘spec’, ‘title’, ‘version’, ‘_types’, ‘client’, ‘errors’, ‘get_required_scopes’, ‘http’, ‘models’, ‘oauth’, ‘quote’, ‘set_required_scopes’, ‘utils’]

Seems that its the spotify · PyPI library. @jodal how we do handle this?

I opened an issue with the other project: Not possible to install spotify.py and pyspotify at the same time · Issue #66 · mental32/spotify.py · GitHub

1 Like

Thank you both! I look forward to hearing from you when there’s a workaround or solution.
All the best!

If you know you are not using that library, a workaround you can do right now is to remove it from your system.

Is there an easy way to do that, by chance? Sorry - I’m not stupid, just new to Linux.

From the path to the library, I think the Python installation in question is /usr/local/bin/python3.7, so the following should work:

sudo /usr/local/bin/python3.7 -m pip uninstall spotify

Edit: Fixed python path

I swear, I’m not doing this to be difficult, but:

$ sudo /usr/local/lib/python3.7 -m pip uninstall spotify
sudo: /usr/local/lib/python3.7: command not found

Sorry, I forgot to correct the path the second place I pasted it. I’ve updated it now.

I appreciate the time, gents. I think something strange is going on here. I’m going to do a fresh image and start over. This is just too far gone now. I’ll start back at square one and will read the document step by step.
Thank you both for your time going back and forth. I’ve learned quite a bit throughout this process and sincerely appreciate the assistance.

Well! After all of that, I started a fresh image (raspbian full) with a pirate audio line out hat. Used their link they provided (git clone) and everything is working. Playback is smooth and everything is working as expected.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.