I will say in advance that the code run locally works completely without errors.
First page (sign up):
if the form is filled out correctly, the received data is processed by the create_account
method and entered into the database.
But when submitting the form, an error occurs (indicated below in the logs)
Second page (sign in):
When I enter the correct user data, the page refreshes, but nothing else happens, although the page components should be displayed.
Q: What do I need to do to fix this error?
Here is a link to my repository:
deploy logs:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/gradehubplus/sign_up.py", line 70, in <module>
_state = auth.create_acc(
^^^^^^^^^^^^^^^^
File "/mount/src/gradehubplus/db_management.py", line 452, in create_acc
handler_state = self.__create_acc_handler(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/src/gradehubplus/db_management.py", line 497, in __create_acc_handler
valid = self.check_hash_key(key, h_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/src/gradehubplus/db_management.py", line 126, in __check_hash_key
valid = bc.checkpw(
^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/bcrypt/__init__.py", line 91, in checkpw
ret = hashpw(password, hashed_password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/bcrypt/__init__.py", line 84, in hashpw
return _bcrypt.hashpass(password, salt)
^^^^^^^^^^^^^^^^
AttributeError: module 'bcrypt._bcrypt' has no attribute 'hashpass'