TA debugging online submissions
From 6.034 Wiki
(Difference between revisions)
(New page: This is a page of commonly encountered errors related to the online tester. == "Error: Either your key.py file is out of date, or online tests for lab0 are not currently available" == Th...) |
(→"Error: Either your key.py file is out of date, or online tests for lab0 are not currently available": instructions for manually updating passwords) |
||
Line 10: | Line 10: | ||
:* out-of-date key.py due to student using an expired certificate | :* out-of-date key.py due to student using an expired certificate | ||
:* the database was reset, invalidating all previous key.py files (this should only happen when the database is cleared, which is unlikely to occur during a semester) | :* the database was reset, invalidating all previous key.py files (this should only happen when the database is cleared, which is unlikely to occur during a semester) | ||
+ | |||
+ | :If the student has tried re-downloading their key.py file and it didn't work, it's possible to manually update their password in the database so that their key will authenticate correctly. Instructions (may require superuser privileges): | ||
+ | :#Go to a SHA1 hash generator such as [http://online-code-generator.com/sha1-hash-with-optional-salt.php]. | ||
+ | :#Open the student's key.py file in a text viewer and copy/paste the PASSWORD string (without the quotes) in the input string field. | ||
+ | :#In the [https://ai6034.mit.edu/labs/admin/auth/user/ Django database], open the student's user page. (This is the step that may require superuser privileges.) | ||
+ | :#In the Django database user page, find the Password field, which should look something like <tt>sha1$ac536$de872b11de91b01489ca980abeb89c0c9ed04463</tt>. The password is in the form <tt>[algo]$[salt]$[hexdigest]</tt>. Copy/paste the 5-character "salt" string into the "salt" field of the hash generator. If applicable, select the option of adding the salt before the string (not after). | ||
+ | :#Copy the result from the hash generator. Delete the existing "hexdigest" portion of the student's Django password and paste the hashed result in its place. | ||
+ | :#Click Save on the Django page. | ||
* <pre>"<class 'tester.test.models.DoesNotExist'>:Lab matching query does not exist."</pre> | * <pre>"<class 'tester.test.models.DoesNotExist'>:Lab matching query does not exist."</pre> | ||
:This means the server is not currently accepting submissions. This is probably a Django database issue (the "lab" object (e.g. "lab0") is missing in the database). | :This means the server is not currently accepting submissions. This is probably a Django database issue (the "lab" object (e.g. "lab0") is missing in the database). |
Revision as of 04:39, 13 September 2016
This is a page of commonly encountered errors related to the online tester.
"Error: Either your key.py file is out of date, or online tests for lab0 are not currently available"
This is usually caused by an out-of-date key.py file, which is sometimes a result of the student changing their Athena password. However, if you believe it might be a server error or something more complicated, ask the student comment out the except block in tester.py starting with except xmlrpclib.Fault: (for Lab 0, this is lines 250-254 of tester.py), then try submitting again. This should result in an error traceback (printed in the command line). The end of the error traceback should say something like:
-
"<class 'tester.test.testutils.AuthenticationFailure'>:Error: invalid username or password. Please make sure your key.py file is up-to-date."
- This indicates an authentication problem, which could be caused by:
- out-of-date key.py due to student changing their password
- out-of-date key.py due to student using an expired certificate
- the database was reset, invalidating all previous key.py files (this should only happen when the database is cleared, which is unlikely to occur during a semester)
- If the student has tried re-downloading their key.py file and it didn't work, it's possible to manually update their password in the database so that their key will authenticate correctly. Instructions (may require superuser privileges):
- Go to a SHA1 hash generator such as [1].
- Open the student's key.py file in a text viewer and copy/paste the PASSWORD string (without the quotes) in the input string field.
- In the Django database, open the student's user page. (This is the step that may require superuser privileges.)
- In the Django database user page, find the Password field, which should look something like sha1$ac536$de872b11de91b01489ca980abeb89c0c9ed04463. The password is in the form [algo]$[salt]$[hexdigest]. Copy/paste the 5-character "salt" string into the "salt" field of the hash generator. If applicable, select the option of adding the salt before the string (not after).
- Copy the result from the hash generator. Delete the existing "hexdigest" portion of the student's Django password and paste the hashed result in its place.
- Click Save on the Django page.
-
"<class 'tester.test.models.DoesNotExist'>:Lab matching query does not exist."
- This means the server is not currently accepting submissions. This is probably a Django database issue (the "lab" object (e.g. "lab0") is missing in the database).