itemloaders
                                
                                
                                
                                    itemloaders copied to clipboard
                            
                            
                            
                        get_output_value behavior differs from load_item with empty data
If an output processor requires a value and a field has no data, doing get_output_value will raise an exception whereas load_item doesn't.  I expected get_output_value to return None in this case.
load_item doesn't even return the field name on fields that it can't parsed(or there is no data), which in my opinion is kinda bad as sometimes it is better to have a default value for fields that are not found.
The only 2 times get_output_value raises an error are :
- There is some kind of Exception on the output_processor for the specific field name
 - The field name does not contain inside 
self._values 
I use this personal function to fill in missing a default value for missing field names after an item has been loaded using the load_item method.
def default_missing_keys(item, default_value='', except_keys=[]):
    missing_keys = list(set(item.fields.keys()) - set(item.keys()))
    for missing_key in missing_keys:
        if except_keys:
            if missing_key not in except_keys:
                item[missing_key] = default_value
        else:
            item[missing_key] = default_value