NameError("name 'loc' is not defined",) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: name 'loc' is not defined)