diff --git a/djangoapps/courseware/modules/capa_module.py b/djangoapps/courseware/modules/capa_module.py index caee3a0cd1..54cb257440 100644 --- a/djangoapps/courseware/modules/capa_module.py +++ b/djangoapps/courseware/modules/capa_module.py @@ -206,6 +206,7 @@ class Module(XModule): if self.DEBUG: # create a dummy problem instead of failing fp = StringIO.StringIO('Problem file %s is missing' % self.filename) + fp.name = "StringIO" else: raise Exception,err try: @@ -218,6 +219,7 @@ class Module(XModule): msg += '

%s

' % traceback.format_exc().replace('<','<') # create a dummy problem with error message instead of failing fp = StringIO.StringIO('Problem file %s has an error:%s' % (self.filename,msg)) + fp.name = "StringIO" self.lcp=LoncapaProblem(fp, self.item_id, state, seed = seed, system=self.system) else: raise Exception,err