was getting unicode errors when exporting CB22x

This commit is contained in:
Chris Dodge
2013-08-14 23:09:06 -04:00
parent 0350dea2eb
commit 958597ac71
2 changed files with 4 additions and 1 deletions

View File

@@ -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': '',

View File

@@ -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')