diff --git a/core/interact/interact.py b/core/interact/interact.py index 38d6605..a18d172 100644 --- a/core/interact/interact.py +++ b/core/interact/interact.py @@ -1,5 +1,6 @@ import multiprocessing import os +import json import sys import threading import time @@ -46,10 +47,10 @@ class InteractBase(object): self.process_messages_callbacks = {} self.default_answers = {} - answer_filename = 'workspace/interact/interact_dict.pkl' + answer_filename = 'workspace/interact/interact_dict.json' if os.path.exists(answer_filename): - with open(answer_filename, 'rb') as file: - self.default_answers = pickle.load(file) + with open(answer_filename, 'r') as file: + self.default_answers = json.load(file) def is_support_windows(self): return False diff --git a/core/interact/no_interact_dict.py b/core/interact/no_interact_dict.py index dd4d55c..ef29e74 100644 --- a/core/interact/no_interact_dict.py +++ b/core/interact/no_interact_dict.py @@ -1,4 +1,5 @@ import pickle +import json import os dictionary = { @@ -51,8 +52,8 @@ dictionary = { } cmd = 'mkdir DeepFaceLab_Linux/workspace/interact' os.system(cmd) -with open('DeepFaceLab_Linux/workspace/interact/interact_dict.pkl', 'wb') as handle: - pickle.dump(dictionary, handle, protocol=4) +with open('DeepFaceLab_Linux/workspace/interact/interact_dict.json', 'w') as handle: + pickle.dump(dictionary, handle) #with open('DeepFaceLab_Linux/workspace/interact/interact_dict.pkl', 'rb') as handle: # d = pickle.load(handle)