Skip to content

Handling Missing Files #13

@pulatea

Description

@pulatea

In the code there were some parts that read/open different file formats. These were not handled if the file does not exist. It will just throw an error and the application will crash.
An example of where this could be improves is in the file profile_class.py (Personal_Task_Manager -> src -> profile_class.py), in this code snippet. My suggesiton is to add a check to ensure the file exists before attempting to read it. If the file doesn't exist then initialize an empty dataframe.

def load_tasklist(self): """Load tasklist from CSV.""" self.tasklist = pd.read_csv('tasklist.csv') self.tasklist['Deadline'] = pd.to_datetime(self.tasklist['Deadline'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions