diff --git a/common/lib/capa/capa_problem.py b/common/lib/capa/capa_problem.py index f107f5f535..db41ef5441 100644 --- a/common/lib/capa/capa_problem.py +++ b/common/lib/capa/capa_problem.py @@ -127,7 +127,7 @@ class LoncapaProblem(object): responder.preprocess_response() def __unicode__(self): - return u"LoncapaProblem ({0})".format(os.path.basename(self.filename)) + return u"LoncapaProblem ({0})".format(os.path.basename(self.fileobject.name)) def get_state(self): ''' Stored per-user session data neeeded to: diff --git a/common/lib/capa/checker.py b/common/lib/capa/checker.py index 109ba636cd..a4f4b8683f 100755 --- a/common/lib/capa/checker.py +++ b/common/lib/capa/checker.py @@ -32,7 +32,7 @@ def main(): log.info("Opening {0}".format(problem_file.name)) try: - problem = LoncapaProblem(problem_file.name, "fakeid", seed=args.seed) + problem = LoncapaProblem(problem_file, "fakeid", seed=args.seed) except Exception as ex: log.error("Could not parse file {0}".format(problem_file.name)) log.exception(ex)