From 936e2f95aad2749d5d22828c6dd58ba2a542eda4 Mon Sep 17 00:00:00 2001 From: sadrasabouri Date: Fri, 22 Oct 2021 13:08:34 +0330 Subject: [PATCH] fix : minor issues fixed. --- samila/functions.py | 2 +- samila/genimage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samila/functions.py b/samila/functions.py index 0244b94..76959ad 100644 --- a/samila/functions.py +++ b/samila/functions.py @@ -131,7 +131,7 @@ def save_data_file(data1, data2, file_adr): data['data2'] = data2 result = {"status": True, "message": DATA_SAVE_SUCCESS_MESSAGE} try: - with open(file_adr, 'wb') as fp: + with open(file_adr, 'w') as fp: json.dump(data, fp) except Exception as e: result["status"] = False diff --git a/samila/genimage.py b/samila/genimage.py index 8162ec6..b3b17d3 100644 --- a/samila/genimage.py +++ b/samila/genimage.py @@ -144,7 +144,7 @@ class GenerativeImage: """ return save_fig_file(figure=self.fig, file_adr=file_adr, depth=depth) - def save_data(self, file_adr): + def save_data(self, file_adr='data.json'): """ Save datas into a file.