diff --git a/aux_functions.py b/aux_functions.py index 1ec4116..fb9aa84 100644 --- a/aux_functions.py +++ b/aux_functions.py @@ -141,7 +141,7 @@ def plot_time_circle(time, count, title, save_path): footer_text = "www.aqeel-anwar.com/AnalyzeTheChat" plt.figtext(0.55, 0.98, footer_text) - name = save_path[0] + "/" + title + "." + save_path[1] + name = save_path[0] + "\\" + title + "." + save_path[1] # plt_bytes = buf.getvalue() # buf.close() @@ -196,7 +196,8 @@ def plot_bar(x, y, title, save_path, max_limit=0): small = cv2.cvtColor(small, cv2.COLOR_BGR2RGB) height = small.shape[0] f.figimage(small, 5, f.bbox.ymax - 1.4 * height) - name = save_path[0] + "/" + title + "." + save_path[1] + name = save_path[0] + "\\" + title + "." + save_path[1] + name = name.replace('-','').replace('<','') footer_text = "www.aqeel-anwar.com/AnalyzeTheChat" plt.figtext(0.75, 0.98, footer_text) print(name) diff --git a/main.py b/main.py index f376e89..ad1d605 100644 --- a/main.py +++ b/main.py @@ -38,7 +38,7 @@ def process_chat(file_path): args = parser.parse_args() args.path = file_path - chat = open(args.path, mode="r") + chat = open(args.path, mode="r", encoding='utf-8') chat = chat.read() st = T.time() df, df_extended = crawl_the_chat(chat)