-
Notifications
You must be signed in to change notification settings - Fork 1
Handling Missing Files #13
Copy link
Copy link
Open
Description
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'])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels