there is an error after open directory in python, can someone help me fix this problem? :     import os
    import time
    import send2trash
    import datetime
    from tkinter import filedialog
    from tkinter import *
    import tkinter as tk

    root = tk.Tk()
    date = input("Enter your date: ")
    date1 = time.strptime(date, '%Y-%m-%d')
    date2 = time.mktime(date1)
    dirname = filedialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')
    
    for f in os.listdir(dirname):
           modified_time = os.path.getmtime(f)
        if modified_time < date2:
            send2trash.send2trash(f)

and there is an error: can someone help me to fix this error, thanks
[enter image description here][1]


  [1]: https://i.stack.imgur.com/DlnL4.png