def decode_data(log, dbc_db):
    """
    Decode byte-object to readable log file.

    Parameters
    ----------
    log : can.io.blf.BLFReader
        File object of raw blf data.
    dbc_db : cantools.db.Database
        dbc database to convert the data from binary format.

    Returns
    -------
    decoded : :obj:`dict`
        Dictionary of numpy arrays. The first row is the time data and the
        second row is the value data.

    """
    decoded = {}
    undecoded = []
    for msg in log:
        try:
            dec = dbc_db.decode_message(msg.arbitration_id, msg.data)
            if dec:
                for key, data in dec.items():
                    if key not in decoded:
                        decoded[key] = []
                    decoded[key].append([msg.timestamp, data])
        # Catch every error which can occur and save the msg
        except:
            undecoded.append(msg)

    error_ids = set(map(lambda m: m.arbitration_id, undecoded))
    if error_ids:
        print("The following IDs caused errors: " + str(error_ids))

    return decoded