Commit 958597ac by Chris Dodge

was getting unicode errors when exporting CB22x

parent 0350dea2
......@@ -348,6 +348,8 @@ def generate_export_course(request, org, course, name):
try:
export_to_xml(modulestore('direct'), contentstore(), loc, root_dir, name, modulestore())
except SerializationError, e:
logging.exception('There was an error exporting course {0}. {1}'.format(course_module.location, unicode(e)))
unit = None
failed_item = None
parent = None
......@@ -380,6 +382,7 @@ def generate_export_course(request, org, course, name):
})
})
except Exception, e:
logging.exception('There was an error exporting course {0}. {1}'.format(course_module.location, unicode(e)))
return render_to_response('export.html', {
'context_course': course_module,
'successful_import_redirect_url': '',
......
......@@ -266,7 +266,7 @@ class VideoDescriptor(VideoFields, TabsEditingDescriptor, EmptyDataRawDescriptor
if key in fields and fields[key].default == getattr(self, key):
continue
if value:
xml.set(key, str(value))
xml.set(key, unicode(value))
for source in self.html5_sources:
ele = etree.Element('source')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment