Studio Saving Error in copying "Student Grade Assignment" unit in Open edX

Hello,
I have the problem of " The studio server encountered an error " in copying “Student Grade Assignment” unit and get studio saving error. I use Ironwood version.
How can I solve it?
Please help me.

CMS Error Log is

Jul  7 12:23:10 Edx-VM [service_variant=cms][django.request][env:sandbox] ERROR [Edx-VM  5542] [exception.py:135] - Internal Server Error: /xblock/
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 40, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/util/json_request.py", line 53, in parse_json_into_request
    return view_function(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/item.py", line 225, in xblock_handler
    request.json.get('display_name'),
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/item.py", line 913, in _duplicate_item
    return dest_module.location
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mixed.py", line 1016, in bulk_operations
    yield
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/__init__.py", line 195, in bulk_operations
    self._end_bulk_operation(course_id, emit_signals, ignore_case)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/__init__.py", line 289, in _end_bulk_operation
    dirty = self._end_outermost_bulk_operation(bulk_ops_record, structure_key)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/split_mongo/split.py", line 254, in _end_outermost_bulk_operation
    self.db_connection.insert_structure(bulk_write_record.structures[_id], bulk_write_record.course_key)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/split_mongo/mongo_connection.py", line 414, in insert_structure
    self.structures.insert(structure_to_mongo(structure, course_context))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mongodb_proxy.py", line 115, in __call__
    return self.proxied_object(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/collection.py", line 540, in insert
    gen(), check_keys, self.uuid_subtype, client)
InvalidDocument: Cannot encode object: u'Staff Graded Assignment'
1 Like

Welcome to the open edX community. I’m sorry that you’re having trouble with the SGA xBlock.

Can you confirm which version of SGA you have installed? I believe the version included in Ironwood was 0.8.3.

I believe this bug with copying SGA xBlocks in Studio was fixed in SGA 0.9.0. Can you try upgrading?

1 Like

@pdpinch Can you give me sga 0.9.0 upgrade command or way ? Thanks for your reply and help.

Let me know. Can it occur some server errors if I upgrade sga version?

Hello,

In my experience this error happens when you upload files with special characters and spaces, as I mean special characters in my case like ñ and accents in Spanish.

You should check if when uploading a file you still get the same error.

1 Like

I have upgraded sga version. But studio does not show “Student Graded Assignment” button in “Advanced” component type after adding

  1. “edx_sga” in Advanced Settings in Settings
    2)“ADDL_INSTALLED_APPS”: [“edx_sga”], in lms.env.json and cms.env.json
    3)“ALLOW_ALL_ADVANCED_COMPONENTS”: true, in cms.env.json.
    What need to add in studio? Please help me.

What version of SGA did you install?

Since you are on Ironwood, I would recommend trying 0.9.0, which I believe still supports python 2.7. Ironwood is still in python 2.7.

  • Peter
1 Like

Yes, I have installed edx sga version 0.9.0. But I have the same bug of not showing “Student Grade Assignment” button in studio. Thanks for your reply.
My CMS Log is

Hello @pdpinch ,
Here are my cms and lms log files after upgrading edx-sga version 0.9.0.
Thank you so much for your reply and help.
edx_cms.log (305.7 KB)
edx_lms.log (407.8 KB)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.