bjarneo / Pytify

A CLI application for controlling Spotify
MIT License
743 stars 40 forks source link

Problem with .service files #1

Closed guillaume8375 closed 9 years ago

guillaume8375 commented 9 years ago

Hi,

This app doesn't work.

When I'm launching it, I get the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/song", line 70, in <module>
    app()
  File "/usr/local/bin/song", line 7, in app
    spotify = Spotify.Spotify()
  File "/home/guillaume/bin/PythonSpotify/Spotify.py", line 17, in __init__
    dbus.SessionBus().get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2'),
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files
bjarneo commented 9 years ago

Oh, I forgot to mension on the readme that you actually have to start spotify. Or else the script can't hook into spotify.

Let me know if it still doesn't work.

Anyways thanks for letting me know. I'll add a better response message than an exception.

On Sat Jan 10 2015 at 3:22:32 PM guillaume8375 notifications@github.com wrote:

Hi,

This app doesn't work.

When I'm launching it, I get the following exception:

Traceback (most recent call last): File "/usr/local/bin/song", line 70, in app() File "/usr/local/bin/song", line 7, in app spotify = Spotify.Spotify() File "/home/guillaume/bin/PythonSpotify/Spotify.py", line 17, in init dbus.SessionBus().get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2'), File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object follow_name_owner_changes=follow_name_owner_changes) File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in init self._named_service = conn.activate_name_owner(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name 'su', (bus_name, flags))) File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.MediaPlayer2.spotify was not provided by any .service files

— Reply to this email directly or view it on GitHub https://github.com/bjarneo/PythonSpotify/issues/1.

maxdevjs commented 7 years ago

Just as a reminder, is still not on the readme that we actually have to start spotify :)

bjarneo commented 7 years ago

@max-devjs Sir, you are correct. I'll update the readme today :)

bjarneo commented 7 years ago

https://github.com/bjarneo/Pytify/commit/1e5b465ef6a5d9fc127c73d77c444b6b24f6f11e