diff --git a/chatterbot/corpus.py b/chatterbot/corpus.py index fab428c8a..a57d23530 100644 --- a/chatterbot/corpus.py +++ b/chatterbot/corpus.py @@ -35,7 +35,7 @@ def read_corpus(file_name): Read and return the data from a corpus json file. """ with io.open(file_name, encoding='utf-8') as data_file: - return yaml.load(data_file) + return yaml.safe_load(data_file) def list_corpus_files(dotted_path):