diff --git a/utilities.py b/utilities.py index 42cdf82..9ebd76c 100644 --- a/utilities.py +++ b/utilities.py @@ -29,10 +29,16 @@ def save_moveset(moveset): path = '\moveset_data.json' else: path = '/moveset_data.json' - output_file = os.path.normpath(os.getcwd()) + '\moveset_data.json' + output_file = os.path.normpath(os.getcwd()) + path results = {} - f = open(output_file, 'r+') + try: + f = open(output_file, 'r+') + except: + open(output_file, 'a').close() + finally: + f = open(output_file, 'r+') + try: results = json.load(f) except: