<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action_edit(self, courseid, taskid, path):
 """ Edit a file """

        wanted_path = self.verify_path(courseid, taskid, path)
        if wanted_path is None:
            return "Internal error"
        try:
            content = self.task_factory.get_task_fs(courseid, taskid).get(wanted_path).decode("utf-8")
            return json.dumps({"content": content})
        except:
            return json.dumps({"error": "not-readable"})