def translate_path(path): print(path) if path == '' or not os.path.exists(path): return jsonify({'info': 'cannot find the path' + path}) else: result = Filehandler.translate_from_path(path) return jsonify({'info': result})