From 2c62821afc7d21cd345d6ba43b6a67dce6f526e0 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Tue, 8 Jun 2021 19:12:59 +0000
Subject: Changed StringIO to BytesIO since it apparently needs to be useed
 with ZipFile writestr in Python 3

---
 wqflask/wqflask/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'wqflask')

diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index ebe5303a..0714bd20 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -623,7 +623,7 @@ def export_traits_csv():
         now = datetime.datetime.now()
         time_str = now.strftime('%H:%M_%d%B%Y')
         filename = "export_{}".format(time_str)
-        memory_file = io.StringIO()
+        memory_file = io.BytesIO()
         with ZipFile(memory_file, mode='w', compression=ZIP_DEFLATED) as zf:
             for the_file in file_list:
                 zf.writestr(the_file[0], the_file[1])
-- 
cgit v1.2.3