TA debugging online submissions

From 6.034 Wiki

(Difference between revisions)
Jump to: navigation, search
("Error: Either your key.py file is out of date, or online tests for lab0 are not currently available")
Line 5: Line 5:
== "Error: Either your key.py file is out of date, or online tests for lab0 are not currently available" ==
== "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 <tt>except</tt> block in tester.py starting with <tt>except xmlrpclib.Fault:</tt> (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:
+
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 <tt>except</tt> block in tester.py starting with <tt>except xmlrpclib.Fault:</tt> (for Lab 0, this is 5 lines of tester.py, probably near line 254), 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 one of the following:
* <pre>"<class 'tester.test.testutils.AuthenticationFailure'>:Error: invalid username or password.  Please make sure your key.py file is up-to-date."</pre>
* <pre>"<class 'tester.test.testutils.AuthenticationFailure'>:Error: invalid username or password.  Please make sure your key.py file is up-to-date."</pre>
Line 11: Line 11:
:* out-of-date key.py due to student changing their password
:* out-of-date key.py due to student changing their password
:* 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 once a year, so it 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):
: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):

Revision as of 04:53, 13 September 2016

Contents


This is intended to be a TA reference page of commonly encountered errors related to the online tester. This page is not intended to be shared with students.

"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 5 lines of tester.py, probably near line 254), 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 one of the following:

  • "<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 once a year, so it 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):
  1. Go to a SHA1 hash generator such as [1].
  2. 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.
  3. In the Django database, open the student's user page. (This is the step that may require superuser privileges.)
  4. 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).
  5. 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.
  6. 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).

Tester hangs forever or prints httplib.BadStatusLine: ' '

If the student is using Windows and there isn't an obvious key issue, the most likely culprit is the Python version, especially if the tester just hangs forever, or hangs for a while and then prints httplib.BadStatusLine: ' '. On Windows, Python 2.7 is often not sufficient: Python versions 2.6.5 through 2.7.3 seem to be incompatible with our server. In 2015, we found that 2.7.10 worked well with Windows.

If all else fails, you can ask students to submit from Athena. If their OS setup has the ability to transfer files to Athena (such as the scp command) and the ability to ssh into an Athena command line, they can submit through Athena without having to physically go to a cluster.

Personal tools