I searched through the cs50, but found no solutions for my problem:
passwrd = pwd_context.encrypt(request.form.get("password"))
db.execute("INSERT INTO users (username, hash, cash) VALUES (:username, :hash, :cash)", request.form.get("username"), passwrd, 10000)
RuntimeError: 'str' object has no attribute 'key'