Shouldn't it be frappe.request.path, like in the above line?