Peer-assessment - Api returned unclassified exception

289 views
Skip to first unread message

Christian Burkhart

unread,
Oct 8, 2015, 7:18:41 AM10/8/15
to Open edX operations


Hi there,

I am pretty new to the edX-platform. I am a university teacher and we managed to install edx as a virtual machine on our server. The system is relatively stable at the moment except for some minor bugs. A crucial one is the peer assessment. Whenever students submit a peer assessment an unclassified exception is returned:



This is the traceback from /etc/var/log/lms/edx.log:


Oct  6 10:42:23 edx [service_variant=lms][submissions.api][env:sandbox] INFO [edx  3425] [api.py:804] - Created submission uuid=2a23d1d2-6c06-11e5-9fdd-080027546d70 for (course_id=course-v1:InstitutfuerErziehungswissenschaft+EL2+WS_2015_16, item_id=block-v1:InstitutfuerErziehungswissenschaft+EL2+WS_2015_16+type@openassessment+block@f753df89f29240a488c2c53ce72319e2, anonymous_student_id=857255f6c72748a9cf11ec0009374193)
Oct  6 10:42:23 edx [service_variant=lms][submissions.api][env:sandbox] INFO [edx  3425] [api.py:257] - Get submission 2a23d1d2-6c06-11e5-9fdd-080027546d70
Oct  6 10:42:23 edx [service_variant=lms][submissions.api][env:sandbox] INFO [edx  3425] [api.py:235] - Get submission 2a23d1d2-6c06-11e5-9fdd-080027546d70 (cached)
Oct  6 10:42:23 edx [service_variant=lms][openassessment.assessment.api.student_training][env:sandbox] ERROR [edx  3425] [student_training.py:87] - An internal error has occurred while creating the student training workflow for submission UUID 2a23d1d2-6c06-11e5-9fdd-080027546d70
Traceback (most recent call last):
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/assessment/api/student_training.py", line 81, in on_start
   
StudentTrainingWorkflow.create_workflow(submission_uuid)
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/assessment/models/student_training.py", line 55, in create_workflow
    course_id
=student_item['course_id']
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/manager.py", line 134, in get_or_create
   
return self.get_query_set().get_or_create(**kwargs)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 452, in get_or_create
    obj
.save(force_insert=True, using=self.db)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
   
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
    result
= manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
   
return insert_query(self.model, objs, fields, **kwargs)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
   
return query.get_compiler(using=using).execute_sql(return_id)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 912, in execute_sql
    cursor
.execute(sql, params)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
   
return self.cursor.execute(query, args)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
   
self.errorhandler(self, exc, value)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
   
raise errorclass, errorvalue
DatabaseError: (1406, "Data too long for column 'course_id' at row 1")
Oct  6 10:42:23 edx [service_variant=lms][openassessment.workflow.api][env:sandbox] ERROR [edx  3425] [api.py:103] - An unexpected error occurred while creating the workflow for submission UUID 2a23d1d2-6c06-11e5-9fdd-080027546d70
Traceback (most recent call last):
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/workflow/api.py", line 74, in create_workflow
    workflow
= AssessmentWorkflow.start_workflow(submission_uuid, steps, on_init_params)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/db/transaction.py", line 224, in inner
   
return func(*args, **kwargs)
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/workflow/models.py", line 161, in start_workflow
    on_start_func
(submission_uuid)
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/assessment/api/student_training.py", line 88, in on_start
   
raise StudentTrainingInternalError(msg)
StudentTrainingInternalError: An internal error has occurred while creating the student training workflow for submission UUID 2a23d1d2-6c06-11e5-9fdd-080027546d70
Oct  6 10:42:23 edx [service_variant=lms][openassessment.xblock.submission_mixin][env:sandbox] ERROR [edx  3425] [submission_mixin.py:119] - An unknown error occurred while submitting a response for the user: {'course_id': u'course-v1:InstitutfuerErziehungswissenschaft+EL2+WS_2015_16', 'item_type': 'openassessment', 'item_id': u'block-v1:InstitutfuerErziehungswissenschaft+EL2+WS_2015_16+type@openassessment+block@f753df89f29240a488c2c53ce72319e2', 'student_id': '857255f6c72748a9cf11ec0009374193'}
Traceback (most recent call last):
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/xblock/submission_mixin.py", line 88, in submit
    student_sub_data
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/xblock/submission_mixin.py", line 178, in create_submission
   
self.create_workflow(submission["uuid"])
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/xblock/workflow_mixin.py", line 61, in create_workflow
    workflow_api
.create_workflow(submission_uuid, steps, on_init_params=on_init_params)
 
File "/edx/app/edxapp/venvs/edxapp/src/edx-ora2/openassessment/workflow/api.py", line 104, in create_workflow
   
raise AssessmentWorkflowInternalError(err_msg)
AssessmentWorkflowInternalError: An unexpected error occurred while creating the workflow for submission UUID 2a23d1d2-6c06-11e5-9fdd-080027546d70


It apparently has to do with mysql . But we are kind of stuck at the moment.

Any help would be appreciated!

Cheers,
Christian


TJ Keemon

unread,
Dec 21, 2015, 11:45:33 PM12/21/15
to Open edX operations
Hi Christian-

I know this is a bit old, but we encountered the same problem as well, so I wanted to leave a note here.

The problem is because the course_id (in your case: course-v1:InstitutfuerErziehungswissenschaft+EL2+WS_2015_16) is too large. This value is limited to 40 chars in the StudentTrainingWorkflow model:

If you check the database directly, you can see course_id is a varchar(40):
+-----------------+--------------+------+-----+---------+----------------+
| Field           | Type         | Null | Key | Default | Extra          |
+-----------------+--------------+------+-----+---------+----------------+
| id              | int(11)      | NO   | PRI | NULL    | auto_increment |
| submission_uuid | varchar(128) | NO   | UNI | NULL    |                |
| student_id      | varchar(40)  | NO   | MUL | NULL    |                |
| item_id         | varchar(128) | NO   | MUL | NULL    |                |
| course_id       | varchar(40)  | NO   | MUL | NULL    |                |
+-----------------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

In other areas of edx-platform, course_Id is specified using xmodule_django.models.CourseKeyField:

specified with a larger max_length (e.g. students.models.CourseEnrollment):

and in MySQL:
mysql> describe student_courseenrollment;
+-----------+--------------+------+-----+---------+----------------+
| Field     | Type         | Null | Key | Default | Extra          |
+-----------+--------------+------+-----+---------+----------------+
| id        | int(11)      | NO   | PRI | NULL    | auto_increment |
| user_id   | int(11)      | NO   | MUL | NULL    |                |
| course_id | varchar(255) | NO   | MUL | NULL    |                |
| created   | datetime     | YES  | MUL | NULL    |                |
| is_active | tinyint(1)   | NO   |     | NULL    |                |
| mode      | varchar(100) | NO   |     | NULL    |                |
+-----------+--------------+------+-----+---------+----------------+ 
6 rows in set (0.00 sec)

I'm not sure why the discrepancy exists. Somebody from edX might have more insight.

Our workaround was to recreate the course with a shorter Course ID. This value is automatically generated from the Organization, Course Number, and Course Run specified at course creation time in Studio.
...

Rhonda Nicholson

unread,
Dec 29, 2015, 10:20:41 AM12/29/15
to Open edX operations

Hi Christian, There is a bug logged on this now. We also see the issue on our Cypress instance: https://openedx.atlassian.net/browse/CRI-52. Hopefully, edX will resolve soon.


On Thursday, October 8, 2015 at 7:18:41 AM UTC-4, Christian Burkhart wrote:
...

David Baumgold

unread,
Dec 29, 2015, 11:30:43 AM12/29/15
to opene...@googlegroups.com, Rhonda Nicholson
Rhonda, thanks for filing that issue. However, I want to clarify two things.

First, edX does not provide official support for other organizations running the Open edX software. (See the “How to File a Quality Bug Report” page, under the “Issue Resolution” section.) Having an organized list of bugs that people have come across is helpful for the community, so that people who encounter the same issue can find each other and help each other out. However, edX doesn’t always fix reported bugs — we don’t have the time and expertise to handle every single one! Keep in mind that Open edX is an open source project, and everyone in the community is allowed and encouraged to send pull requests with bugfixes and improvements!

Second, even if the bug gets fixed, the fix will not get applied to the Cypress release. The whole point of the Open edX releases is to provide stable points in time that do not change. The only changes that will get applied to an Open edX release after it has been released are fixes for security vulnerabilities and major showstopping bugs (like data loss). We are in the process of cutting the Dogwood release now, so the earliest this change could go into an Open edX release would be Eucalyptus.

I’m sorry for the bad news, but I wanted to make sure that you had the right expectations for what’s going to happen with this issue.

David Baumgold
Developer Advocate, edX
--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/308bc1dc-afd8-4da8-ac5d-2f450afd4a50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rhonda Nicholson

unread,
Dec 29, 2015, 12:00:42 PM12/29/15
to opene...@googlegroups.com
Thank you so much David! This information is very helpful. Sounds like we can try to fix this ourselves and share the fix back and hope it makes a future release. Enjoy the new year!

Sent from my Windows Phone

From: David Baumgold
Sent: ‎12/‎29/‎2015 11:30 AM
To: opene...@googlegroups.com; Rhonda Nicholson
Subject: Re: [openedx-ops] Re: Peer-assessment - Api returned unclassified exception

You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/QmlVxNZTGek/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/etPan.5682b52f.44d49634.29c%40mastodon.local.

Juanito

unread,
Jun 8, 2016, 4:18:53 PM6/8/16
to Open edX operations
We had the same problem with Dogwood. We had to increase the course_id length column on all the tables related to assessment.

On Thursday, October 8, 2015 at 7:18:41 AM UTC-4, Christian Burkhart wrote:
Reply all
Reply to author
Forward
0 new messages