{"action":"closed","issue":{"url":"https://api.github.com/repos/fr31/spotifylyrics/issues/53","repository_url":"https://api.github.com/repos/fr31/spotifylyrics","labels_url":"https://api.github.com/repos/fr31/spotifylyrics/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/fr31/spotifylyrics/issues/53/comments","events_url":"https://api.github.com/repos/fr31/spotifylyrics/issues/53/events","html_url":"https://github.com/fr31/spotifylyrics/issues/53","id":213393854,"number":53,"title":"Try to catch case of Spotify client not running","user":{"login":"barsnick","id":7283222,"avatar_url":"https://avatars0.githubusercontent.com/u/7283222?v=4","gravatar_id":"","url":"https://api.github.com/users/barsnick","html_url":"https://github.com/barsnick","followers_url":"https://api.github.com/users/barsnick/followers","following_url":"https://api.github.com/users/barsnick/following{/other_user}","gists_url":"https://api.github.com/users/barsnick/gists{/gist_id}","starred_url":"https://api.github.com/users/barsnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsnick/subscriptions","organizations_url":"https://api.github.com/users/barsnick/orgs","repos_url":"https://api.github.com/users/barsnick/repos","events_url":"https://api.github.com/users/barsnick/events{/privacy}","received_events_url":"https://api.github.com/users/barsnick/received_events","type":"User","site_admin":false},"labels":[{"id":395202111,"url":"https://api.github.com/repos/fr31/spotifylyrics/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-10T16:52:21Z","updated_at":"2018-03-18T06:50:26Z","closed_at":"2018-03-18T06:50:26Z","author_association":"NONE","body":"This applies to Linux - I have no idea what happens on Windows:\r\n\r\nWhen I don't have Spotify running, or close it while spotifylyrics is running, the DBUS code will throw an exception, probably because the query for the spotify-client fails:\r\n\r\n```\r\nException in thread Thread-1:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python3.5/threading.py\", line 914, in _bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib64/python3.5/threading.py\", line 862, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"SpotifyLyrics.pyw\", line 279, in lyrics_thread\r\n    songname = backend.getwindowtitle()\r\n  File \"/home/barsnick/Development/spotifylyrics/backend.py\", line 104, in getwindowtitle\r\n    metadata = spotifyinterface.Get(\"org.mpris.MediaPlayer2.Player\", \"Metadata\")\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/proxies.py\", line 70, in __call__\r\n    return self._proxy_method(*args, **keywords)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/proxies.py\", line 145, in __call__\r\n    **keywords)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/connection.py\", line 651, in call_blocking\r\n    message, timeout)\r\ndbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.\r\n```\r\nSpotifyLyrics doesn't catch up once I run spotify-client (while leaving SpotifyLyrics running).\r\n\r\n\r\nIn another run, I got this, which is different:\r\n```\r\nException in thread Thread-1:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/bus.py\", line 175, in activate_name_owner\r\n    return self.get_name_owner(bus_name)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/bus.py\", line 361, in get_name_owner\r\n    's', (bus_name,), **keywords)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/connection.py\", line 651, in call_blocking\r\n    message, timeout)\r\ndbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.mpris.MediaPlayer2.spotify': no such name\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python3.5/threading.py\", line 914, in _bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib64/python3.5/threading.py\", line 862, in run\r\n    self._target(*self._args, **self._kwargs)\r\n  File \"SpotifyLyrics.pyw\", line 279, in lyrics_thread\r\n    songname = backend.getwindowtitle()\r\n  File \"/home/barsnick/Development/spotifylyrics/backend.py\", line 102, in getwindowtitle\r\n    spotifydbus = session.get_object(\"org.mpris.MediaPlayer2.spotify\", \"/org/mpris/MediaPlayer2\")\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/bus.py\", line 241, in get_object\r\n    follow_name_owner_changes=follow_name_owner_changes)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/proxies.py\", line 248, in __init__\r\n    self._named_service = conn.activate_name_owner(bus_name)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/bus.py\", line 180, in activate_name_owner\r\n    self.start_service_by_name(bus_name)\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/bus.py\", line 278, in start_service_by_name\r\n    'su', (bus_name, flags)))\r\n  File \"/usr/lib64/python3.5/site-packages/dbus/connection.py\", line 651, in call_blocking\r\n    message, timeout)\r\ndbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files\r\n```\r\nThis is pretty obvious, the query for spotify failed. I don't know whether SpotifyLyrics runs fine nevertheless.\r\n\r\nPerhaps these exceptions are worth taking a look and handling.\r\n\r\nThanks for a tool which I really dig!"}}
{"actor":{"display_login":"fr31"}}