# Buggy code
def __init__(self, row, timestamp, action_type, source, destination):
    """Actions related with sending files.

    Args:
      row:
        filepath: path from the file.
        filename: name of the file.
        filesize: size of the file.
      timestamp: when the action happens.
      action_type: GETSOLICITUDE, SENDSOLICITUDE, ACCEPTED, FINISHED.
      source: The account that sent the file.
      destination: The account that received the file.
    """
    # Note that pysqlite does not accept a Unicode string in row['string'] and
    # will raise "IndexError: Index must be int or string".

    super(SkypeTransferFileEvent, self).__init__(
        timestamp, "File transfer from Skype", self.DATA_TYPE
    )

    self.offset = row["id"]
    self.action_type = action_type
    self.source = source
    self.destination = destination
    self.transferred_filepath = row["filepath"]
    self.transferred_filename = row["filename"]

    try:
        self.transferred_filesize = int(row["filesize"])
    except ValueError:
        logging.debug("Unknown filesize {0:s}".format(self.transferred_filename))
        self.transferred_filesize = 0


# Traceback (AttributeError)
Traceback (most recent call last):
File "plaso\engine\worker.py", line 684, in _ProcessPathSpec
File "plaso\engine\worker.py", line 636, in _ProcessFileEntry
File "plaso\engine\worker.py", line 555, in _ProcessDataStream
File "plaso\engine\worker.py", line 353, in _ParseFileEntryWithParser
File "plaso\parsers\interface.py", line 288, in Parse
File "plaso\parsers\sqlite.py", line 268, in ParseFileObject
File "plaso\parsers\plugins.py", line 88, in UpdateChainAndProcess
File "plaso\parsers\sqlite_plugins\interface.py", line 89, in Process
File "plaso\parsers\sqlite_plugins\interface.py", line 52, in GetEntries
File "plaso\parsers\sqlite_plugins\skype.py", line 299, in ParseSMS
AttributeError: 'NoneType' object has no attribute 'replace'

# Fixed code
def __init__(
    self,
    posix_time,
    identifier,
    action_type,
    source,
    destination,
    filename,
    file_path,
    file_size,
):
    """Actions related with sending files.

    Args:
      posix_time: the POSIX time value, which contains the number of seconds
                  since January 1, 1970 00:00:00 UTC.
      identifier: an integer containing the row identifier.
      action_type: a string containing the action type e.g. GETSOLICITUDE,
                   SENDSOLICITUDE, ACCEPTED, FINISHED.
      source: a string containing the account that sent the file.
      destination: a string containing the account that received the file.
      filename: a string containing the name of the file transferred.
      file_path: a string containing the path of the file transferred.
      file_size: an integer containing the size of the file transferred.
    """
    # Note that pysqlite does not accept a Unicode string in row['string'] and
    # will raise "IndexError: Index must be int or string".

    super(SkypeTransferFileEvent, self).__init__(posix_time, "File transfer from Skype")
    self.action_type = action_type
    self.destination = destination
    self.offset = identifier
    self.source = source
    self.transferred_filename = filename
    self.transferred_filepath = file_path
    self.transferred_filesize = file_size