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'


It's bad syntax. Review walkthrough 2 around 2:20 to see how to properly set the bind variable arguments. You can also review the select query in the login route.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .