

def __init__(self, filename):
    try:
        self.data = plistlib.readPlist(filename)
    except AttributeError as err:
        if (str(err) == "'NoneType' object has no attribute 'groupdict'"):
            raise PlistError('Unable to parse {} due to invalid ISO 8601 date.'.format(filename))
        raise
    except IOError as err:
        raise PlistError('Unable to read {}: {}'.format(filename, repr(err)))
    if ('Creation Date' not in self.data):
        raise KeyError('Creation Date')
    self.data['Text'] = self.data.pop('Entry Text', '')
    for key in ['Location', 'Weather', 'Music', 'Creator']:
        if (key in self.data):
            new_keys = ((k, v) for (k, v) in self.data[key].items() if (k not in self.data))
            self.data.update(filename)

dataset/ETHPy150Open nathangrigg/dayone_export/dayone_export/__init__.py Entry.__init__/VarMisuse@191/280 `new_keys`->`filename`