edx-platform
edx-platform copied to clipboard
error in studio with unicode chars
I've created course with Arabic chars in "Course Number" field, then reloaded and gave me this error
Unicode error hint
The string that could not be encoded/decoded was: data/مقا
Traceback:
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
20. return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py" in course_handler
122. return course_listing(request)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
20. return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
91. response = view_func(request, *args, **kwargs)
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py" in course_listing
136. courses = modulestore('direct').get_items(Location(None, None, None, 'course', None))
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py" in get_items
607. modules = self._load_items(list(items), depth)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py" in _load_items
527. apply_cached_metadata=(item['location']['category'] != 'course' or depth != 0)) for item in items]
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/modulestore/mongo/base.py" in _load_item
493. if not root.isdir():
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/path.py" in isdir
854. def isdir(self): return self.module.isdir(self)
File "/edx/app/edxapp/venvs/edxapp/lib/python2.7/genericpath.py" in isdir
41. st = os.stat(s)
Exception Type: UnicodeEncodeError at /course
Exception Value: 'latin-1' codec can't encode characters in position 21-23: ordinal not in range(256)
I'm going through old issues in our repository, and I just found this. Can you try this again on the latest version of the edX codebase, and let me know if you can still reproduce the problem?