Friday, July 25, 2014

edx-platform - EDX-SGA's "NoAuthHandlerFound" error

On July 20th, MIT's Office of Digital learning has released an XBlock for a Staff Graded Assignment (SGA). When placed in a course, this XBlock allows students to upload documents which can be viewed and graded by course staff.

Git repository:

But after I enabled the XBlock successfully, I could not upload the assignment file to the sga xblock (stop at 100%):

I checked the log and found this:

File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/", line 174, in __init__
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/", line 557, in __init__
    host, config, self.provider, self._required_auth_capability())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/", line 728, in get_auth_handler
    'Check your credentials' % (len(names), str(names)))
NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
As you can see, the issue was caused by the SGA XBlock used Amazon S3 as files storage which I hadn't set up yet. So, to fix this I just need to change the storage location of the SGA XBlock (which was determined by the DEFAULT_FILE_STORAGE variable in settings) to somewhere I can manage (local):
 => add the following lines (indicate the MEDIA_ROOT directory, and delete DEFAULT_FILE_STORAGE var) to cms/envs/ and lms/envs/ after the DEFAULT_FILE_STORAGE line:
MEDIA_ROOT = "/edx/var/edxapp/uploads"


Then restart edxapp and workers:

# /edx/bin/supervisorctl restart edxapp:
# /edx/bin/supervisorctl restart edxapp_worker: