# Buggy code
def _add_player(self, player_id):
    """
    Add player to mpris_players
    """
    if not player_id.startswith(SERVICE_BUS):
        return False

    player = self._dbus.get(player_id, SERVICE_BUS_URL)

    if player.Identity not in self._mpris_names:
        self._mpris_names[player.Identity] = player_id.split(".")[-1]
        for p in self._mpris_players.values():
            if not p["name"] and p["identity"] in self._mpris_names:
                p["name"] = self._mpris_names[p["identity"]]
                p["full_name"] = "{} {}".format(p["name"], p["index"])

    identity = player.Identity
    name = self._mpris_names.get(identity)
    if (
        self.player_priority != []
        and name not in self.player_priority
        and "*" not in self.player_priority
    ):
        return False

    if identity not in self._mpris_name_index:
        self._mpris_name_index[identity] = 0

    status = player.PlaybackStatus
    state_priority = WORKING_STATES.index(status)
    index = self._mpris_name_index[identity]
    self._mpris_name_index[identity] += 1
    subscription = player.PropertiesChanged.connect(self._player_monitor(player_id))

    self._mpris_players[player_id] = {
        "_dbus_player": player,
        "_id": player_id,
        "_state_priority": state_priority,
        "index": index,
        "identity": identity,
        "name": name,
        "full_name": "{} {}".format(name, index),
        "status": status,
        "subscription": subscription,
    }

    return True


# Traceback (AttributeError)
lasers~/src/py3status/py3status/modules git:(master) python3 mpris.py.
Traceback (most recent call last):
File "mpris.py", line 578, in <module>
module_test(Py3status)
File "/usr/lib/python3.6/site-packages/py3status-3.6rc1-py3.6.egg/py3status/module_test.py", line 47, in module_test
module.post_config_hook()
File "mpris.py", line 176, in post_config_hook
self._start_listener()
File "mpris.py", line 454, in _start_listener
self._get_players()
File "mpris.py", line 440, in _get_players
self._add_player(player)
File "mpris.py", line 411, in _add_player
subscription = player.PropertiesChanged.connect(self._player_monitor(player_id))
AttributeError: '<CompositeObject>' object has no attribute 'PropertiesChanged'

# Fixed code
def _add_player(self, player_id):
    """
    Add player to mpris_players
    """
    if not player_id.startswith(SERVICE_BUS):
        return False

    player = self._dbus.get(player_id, SERVICE_BUS_URL)

    if player.Identity not in self._mpris_names:
        self._mpris_names[player.Identity] = player_id.split(".")[-1]
        for p in self._mpris_players.values():
            if not p["name"] and p["identity"] in self._mpris_names:
                p["name"] = self._mpris_names[p["identity"]]
                p["full_name"] = "{} {}".format(p["name"], p["index"])

    identity = player.Identity
    name = self._mpris_names.get(identity)
    if (
        self.player_priority != []
        and name not in self.player_priority
        and "*" not in self.player_priority
    ):
        return False

    if identity not in self._mpris_name_index:
        self._mpris_name_index[identity] = 0

    status = player.PlaybackStatus
    state_priority = WORKING_STATES.index(status)
    index = self._mpris_name_index[identity]
    self._mpris_name_index[identity] += 1
    try:
        subscription = player.PropertiesChanged.connect(self._player_monitor(player_id))
    except AttributeError:
        subscription = {}

    self._mpris_players[player_id] = {
        "_dbus_player": player,
        "_id": player_id,
        "_state_priority": state_priority,
        "index": index,
        "identity": identity,
        "name": name,
        "full_name": "{} {}".format(name, index),
        "status": status,
        "subscription": subscription,
    }

    return True