Open alirezadigi opened 1 year ago
I concur. I have the same problem and I honestly don't even know where to look, because the Network tab gives me the same responses on log in as the official solution at https://finance.cs50.net/
Furthermore, if I spam the check50
, some.times this specific test passes. Most of the times it does not. I am at a point of breaking the academic honesty. The test error message also changes from time to time in response to my changes. It used to be the one in the title, now it is as follows:
sending GET request to /signin
sending POST request to /login
exception raised in application: IndexError: list index out of range
Needless to say the app works well if you test it manually. It would help to actually have access to the tests and see what they test for.
The test results are also very inconsistent. Without changing the code, I sometimes get the respective test to pass by spam-running the test suite. The logs:
The only difference between the code there is that I tried implementing a '/signin' route that would simply redirect to '/login' or '/register'
I claim the test "logging in as registered user succceeds" is inconsistent.
Ok, i found the solution to this: If in app.py, you call any custom function you created, then YOU SHOULD NOT externalize them in another file! They must be written in app.py, so at the end of the file.
I don't know how tests are processed, but the test doesn't expect that we organize the code in order to reduce redundancy, externalize logical code outside of the file etc.
Source: https://cs50.stackexchange.com/questions/43114/check50-is-broken-on-problem-set-9-finance
Can confirm, I also have this problem
flash('Successfully logged in!')
response = redirect("/", 200)
print(response.status_code)
print(response)
return (response, 200)
# User reached route via GET (as by clicking a link or via redirect)
else:
return render_template("login.html")
Above is a segment of my own code. It works perfectly from all points of view except for check50. I am losing my mind.
hi , i get this error while my code requires redirect so it do need 302 status code please help me if there is anything i should do
i can fix this error by changing my decorated_function like this (in helpers.py), but it breaks other tests and other parts of program