diff --git a/spaceapi/active.py b/spaceapi/active.py --- a/spaceapi/active.py +++ b/spaceapi/active.py @@ -20,7 +20,8 @@ def reload_json(): global default_json global active_json - default_json = json.load(open(default_json_file, encoding='utf-8')) + with open(default_json_file, encoding='utf-8') as f: + default_json = json.load(f) if os.path.exists(last_state_file): with open(last_state_file, encoding='utf-8') as f: