From a1b30a5f7e11455fb61d61fcabf4f597ffb0132b Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 31 Dec 2015 18:03:53 +0000 Subject: [PATCH] 8556: ValueError: underlying buffer has been detached The expat parser requires a binary mode file object. --- gramps/plugins/importer/importxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/plugins/importer/importxml.py b/gramps/plugins/importer/importxml.py index 660aa36ad..0f8b2a59e 100644 --- a/gramps/plugins/importer/importxml.py +++ b/gramps/plugins/importer/importxml.py @@ -428,7 +428,7 @@ class ImportOpenFileContextManager: def __enter__(self): if self.filename == '-': - self.filehandle = sys.stdin + self.filehandle = sys.stdin.buffer else: self.filehandle = self.open_file(self.filename) return self.filehandle