Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset student attempt results in error #101

Closed
natea opened this issue Sep 25, 2016 · 4 comments
Closed

Reset student attempt results in error #101

natea opened this issue Sep 25, 2016 · 4 comments
Assignees
Milestone

Comments

@natea
Copy link

natea commented Sep 25, 2016

When I try to reset the student attempt using the staff debug tool, I get the following error:

2016-09-24 21:08:54,848 ERROR 13297 [root] exceptions.py:9 - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 201, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 174, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 125, in wrapped
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 1984, in reset_student_attempts
    delete_module=delete_module
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 271, in reset_student_attempts
    _reset_module_attempts(module_to_reset)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 281, in _reset_module_attempts
    problem_state = json.loads(studentmodule.state)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
Internal Server Error: /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/reset_student_attempts
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 201, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 174, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 125, in wrapped
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 1984, in reset_student_attempts
    delete_module=delete_module
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 271, in reset_student_attempts
    _reset_module_attempts(module_to_reset)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 281, in _reset_module_attempts
    problem_state = json.loads(studentmodule.state)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
2016-09-24 21:08:54,850 ERROR 13297 [django.request] base.py:256 - Internal Server Error: /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/reset_student_attempts
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 43, in _cache_controlled
    response = viewfunc(request, *args, **kw)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 201, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 174, in wrapped
    return func(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 125, in wrapped
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 1984, in reset_student_attempts
    delete_module=delete_module
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 271, in reset_student_attempts
    _reset_module_attempts(module_to_reset)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/enrollment.py", line 281, in _reset_module_attempts
    problem_state = json.loads(studentmodule.state)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
[24/Sep/2016 21:08:55] "POST /courses/course-v1:edX+DemoX+Demo_Course/instructor/api/reset_student_attempts HTTP/1.1" 500 84640
@xcompass
Copy link
Member

@jleong-openedx could you take a look at it? Thanks.

@jleong-openedx
Copy link
Contributor

Hi @natea, thank you for reporting this. Could you please let me know more about the state of the question when you attempted to delete the student state?

e.g. Had the final answer already been submitted? If the rationale text does not contain any sensitive information, would you be able to post it here so that I can try to reproduce the error?

Also, are you hosting this instance of Open edX yourself/do you have access to the server? If so, would you be able to let us know the version of Peer Instruction that you are working with? Thank you.

@xcompass xcompass added the bug label Jun 13, 2017
@xcompass xcompass added this to the 1.0 milestone Jun 13, 2017
@xcompass
Copy link
Member

maybe related to #119

@lenglund
Copy link
Collaborator

lenglund commented Apr 4, 2018

Will discuss further in #119.

@lenglund lenglund closed this as completed Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants