From 64e93fd40f7bfe43496368ed725d24929b99cf8b Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 4 Jul 2021 09:23:00 -0600 Subject: [PATCH] Fix json pathing in jarvis.data.unicode --- jarvis/data/unicode.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jarvis/data/unicode.py b/jarvis/data/unicode.py index 81ed54e..9c634c6 100644 --- a/jarvis/data/unicode.py +++ b/jarvis/data/unicode.py @@ -1,8 +1,14 @@ import json +from os import getcwd from os import sep as s -with open(f"json{s}emoji_list.json", encoding="UTF8") as f: +json_path = getcwd() +if "jarvis" not in json_path: + json_path += s + "jarvis" +json_path += f"{s}data{s}json{s}" + +with open(json_path + "emoji_list.json", encoding="UTF8") as f: emoji_list = json.load(f) -with open(f"json{s}emoji_data.json", encoding="UTF8") as f: +with open(json_path + "emoji_data.json", encoding="UTF8") as f: emoji_data = json.load(f)