Hot answers tagged

4 votes

Login to CS50 IDE

I'm actually taking the course throught edX, try to follow those steps, since I do it every day and never had a problem. Login to edX: // 2. Open the Cloud 9 IDE link: Cloud9 IDE // 3. Click on ...
Marco A. Bomfim's user avatar
2 votes
Accepted

pset7 C$50 finance check50 error expected status code 200, but got 400

This is pointing to a problem with your index.html page. Have you completed your index function? If not, why are you running check50 which should be used as a final check once you've completed the ...
curiouskiwi's user avatar
  • 18.6k
2 votes
Accepted

The predefined login function does not seem to be working in finance

Try any user with the password password. All users are created with that same password. This hashp = generate_password_hash("password") treats password as a string literal, because of the ". You ...
DinoCoderSaurus's user avatar
1 vote

pset7 C$50 finance check50 error expected status code 200, but got 400

You can "check50" login and register without completing index.html....as long as it doesn't return a 400. If you examine the apology function in helpers.py, you will notice that the code parameter is ...
DinoCoderSaurus's user avatar
1 vote
Accepted

I'm on pset9 right now and I'm running check50 on my code and getting :( logging in as registered user succeeds expected status code 200, but got 403

This hash = generate_password_hash("password") is a problem. It is hashing the string literal "password". (Try to login using "password" as the password; it should work). ...
DinoCoderSaurus's user avatar
1 vote

can someone explain why i get this error code

It's saying that it didn't like your login credentials. Either the username, password, or both are incorrect. It could also, more likely, mean that you haven't completed the setup to allow check50 ...
Cliff B's user avatar
  • 68.7k
1 vote
Accepted

Finance: Ensuring no duplicate usernames

Move your != 0 outside that parenthesis, len(rows) != 0:
Ojou Nii's user avatar
  • 731
1 vote
Accepted

Why do i get a 400 error with finance login?

By definition (from helpers.py): def apology(message, code=400): The apology function returns a 400. So if you haven't completed your index route yet, you should expect that it will return a 400.
curiouskiwi's user avatar
  • 18.6k
1 vote

CS50 Pset7 Finance login TypeError: invalid method ''

You are probably getting this error because you forgot to enable both methods (post and get). Try adding this: @app.route("/login", methods=["GET", "POST"]) def login():
Eva's user avatar
  • 13
1 vote
Accepted

Strange sudden error in pset7 staff implemented login (key error 'id')

That error from the supplied login means there is no column named id in the users table. It doesn't seem to have anything to do with indexes. Assuming the rest of the table is intact, you might try ...
DinoCoderSaurus's user avatar
1 vote
Accepted

pset7 finance python Login question

I do not think, that the way how you get hash of the password is correct. Try to pass to the function a value, that the user entered, but not the string "password" hash = pwd_context.encrypt(request....
wingedRuslan's user avatar
1 vote

Pset7 Login to CS50 Finance Trouble

You will get that message if the database is not "running". You can check the status with mysql50 status. If it says MySQL is not running., you need to issue a mysql50 start.
DinoCoderSaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible