Skip to content

Commit

Permalink
open the file in binary mode, not the zipfile.
Browse files Browse the repository at this point in the history
Or else error ensues.
  • Loading branch information
Aron Fyodor Asor committed Apr 16, 2015
1 parent 9ea649b commit 18389b3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -64,9 +64,9 @@ def handle(self, *args, **kwargs):
f.flush()
f.seek(0)
else: # file; just open it normally
f = open(ziplocation, "r")
f = open(ziplocation, "rb")

zf = zipfile.ZipFile(f, "rb")
zf = zipfile.ZipFile(f, "r")
extract_assessment_items_to_data_dir(zf)
unpack_zipfile_to_khan_content(zf)

Expand Down

0 comments on commit 18389b3

Please sign in to comment.