From c0d8a8210c1032272dfad9250a765f09e128976f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Grobol?= Date: Fri, 16 Oct 2020 12:36:29 +0200 Subject: [PATCH] don't try to open pickle files in text mode (#26) --- uuparser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uuparser/parser.py b/uuparser/parser.py index 0fdf9b7..a4d50e5 100644 --- a/uuparser/parser.py +++ b/uuparser/parser.py @@ -35,7 +35,7 @@ def run(experiment,options): else: #continue if options.continueParams: paramsfile = options.continueParams - with open(paramsfile, 'r') as paramsfp: + with open(paramsfile, 'rb') as paramsfp: stored_vocab, stored_options = pickle.load(paramsfp) logger.debug('Initializing the model:') parser = Parser(stored_vocab, stored_options)