Since you have ```debug=True```,maybe here ```logging.debug(result)``` is unnecessary.