def getSavedSchedulesJSON(self,requestAsJson): f = open ("/var/www/BYUGetMeThere/BYUGetMeThere/static/Classes/out.txt",'a') #f.write(str(datetime.datetime.now()) + str(e)) f.write(str(requestAsJson)) f.close() try: toReturn = DB.getSavedSchedules(requestAsJson['username']) except Exception, e: toReturn = Parser.error(str(e))