Synthetiser25 / Marist-CMPT120-Final

0 stars 0 forks source link

Default behavior errors #1

Open Synthetiser25 opened 4 hours ago

Synthetiser25 commented 4 hours ago

Attempting to input password will error if not changed from "Pick an account!"

Synthetiser25 commented 4 hours ago

Traceback (most recent call last):
  File "C:\Users\Teknik\AppData\Local\Programs\Python\Python312\Lib\tkinter\__init__.py", line 1968, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Teknik\PycharmProjects\finalProject\main.py", line 85, in <lambda>
    command=lambda: load_user(get_account_by_username(selected_account.get())))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Teknik\PycharmProjects\finalProject\functions.py", line 7, in load_user
    login_attempt = login(acc)  # Will receive true or false by user
                    ^^^^^^^^^^
  File "C:\Users\Teknik\PycharmProjects\finalProject\functions.py", line 32, in login
    if input_password == acc.password:
                         ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'password'```
Synthetiser25 commented 4 hours ago

Won't prevent the program from functioning, but should be fixed