Open Deepikasree29 opened 6 months ago
verify if the name of file is match with the name you put in your code, verify the format, i have no sure, but i think the tkinter library has much match with .png or .ico files. And, python always read links with '\', if you copy and paste link, try to replace '\' to '\'.
I hope help you :)
[Running] python -u "c:\Users\Deepika\Documents\python_test_properties\login.py" Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\tkinter__init.py", line 1962, in call__ return self.func(args) ^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\login.py", line 107, in login self.app=Face_Recognition_System(self.new_window) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\login.py", line 292, in init tra_img_btn=tra_img_btn.resize((180,180),Image.ANTIALIAS) ^^^^^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\tkinter__init.py", line 1962, in call__ return self.func(args) ^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\login.py", line 340, in student_pannels self.app=Student(self.new_window) ^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\student.py", line 44, in init img=Image.open(r"C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 3277, in open fp = builtins.open(filename, "rb") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg' Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\tkinter__init.py", line 1962, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\login.py", line 348, in face_rec self.app=Face_Recognition(self.new_window) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\face_recognition.py", line 22, in init img=Image.open(r"C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 3277, in open fp = builtins.open(filename, "rb") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg' Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\tkinter\init.py", line 1962, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\login.py", line 340, in student_pannels self.app=Student(self.new_window) ^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\Deepika\Documents\python_test_properties\student.py", line 44, in init__ img=Image.open(r"C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Deepika\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 3277, in open fp = builtins.open(filename, "rb") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Muhammad Waseem\Documents\Python_Test_Projects\Images_GUI\banner.jpg'
[Done] exited with code=0 in 97.526 seconds