The problem is in your except block.
except models.DoesNotExist: return json.loads({'error' : 'that set does not exist'})
Should be:
except models.Sets.DoesNotExist: return json.loads({'error' : 'that set does not exist'})